Skip to content

[EarlyReturn] Deprecate ReturnEarlyIfVariableRector - #8818

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-return-early-if-variable
Oct 25, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-deprecate-return-early-if-variable

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Deprecate ReturnEarlyIfVariableRector.

It is too niche, and inlining the if assignment into a direct return can reduce readability by moving a value out of its logical place, while blocking a later refactoring to match.

  • mark rule @deprecated + DeprecatedInterface, gut body to throw
  • unregister from CodeQualityLevel
  • remove its test directory and the IssueRemoveAlwaysElseReturnEarlyIfVariable issue test

@TomasVotruba
TomasVotruba merged commit 74321c9 into main Oct 25, 2026
49 checks passed
@TomasVotruba
TomasVotruba deleted the tv-deprecate-return-early-if-variable branch October 25, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant