-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
[DeadCode] Add RemoveDeadConditionAboveReturnRector #5194
Conversation
if (1 === 1) { | ||
return 'yes'; | ||
} | ||
|
||
return 'yes'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. This case should be covered too, right?
-if (1 === 'hey') {
- return 'yes';
-}
return 'yes';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the check is not in the cond of if, but on its stmt, so that's already covered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added new fixture 08a197f for different cond
All checks have passed 🎉 @TomasVotruba it is ready for review. |
Thank you 👍 |
rectorphp/rector-src@3e505e5 add fixture for only importNames() without removeUnusedIMpotrs() (#5194)
Fixes #4925