Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cleanup] Deprecate ChangeAndIfToEarlyReturnRector as creates less readable code with inverted conditions #6041

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jun 26, 2024

I recall making this rule at early years of Rector, to showcase what Rector can do. Looking at it now, it makes code quite hard to read and removes the original point of single line check.

The rest of early-return give code more readbility 👍 , so this one is an odd one :)
Time to deprecate.

@TomasVotruba TomasVotruba changed the title tv change detection [EarlyReturn] Deprecate ChangeAndIfToEarlyReturnRector as creates less readable code with inverted conditions Jun 26, 2024
@TomasVotruba TomasVotruba force-pushed the tv-change-detection branch 2 times, most recently from 5afe681 to 48bb99d Compare June 26, 2024 09:03
@TomasVotruba TomasVotruba changed the title [EarlyReturn] Deprecate ChangeAndIfToEarlyReturnRector as creates less readable code with inverted conditions [Cleanup] Deprecate ChangeAndIfToEarlyReturnRector as creates less readable code with inverted conditions Jun 26, 2024
@TomasVotruba TomasVotruba merged commit d68e8fa into main Jun 26, 2024
35 checks passed
@TomasVotruba TomasVotruba deleted the tv-change-detection branch June 26, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant