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

[Php56] Skip AddDefaultValueForUndefinedVariableRector on empty() check #1697

Merged
merged 6 commits into from
Jan 19, 2022

Conversation

samsonasik
Copy link
Member

empty() has same result with ! isset() which now isset() and ! isset() check already skipped at

https://github.com/rectorphp/rector-src/blob/main/rules-tests/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector/Fixture/skip_isset_check.php.inc

ref https://3v4l.org/DkGD7#v5.6.40

So empty() should be skipped as well.

@samsonasik
Copy link
Member Author

samsonasik commented Jan 19, 2022

Fixed 🎉 also cleaned up unneeded original node check and used in params renamed by other rule check as handled at RectifiedAnalyzer.

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit 7d92627 into main Jan 19, 2022
@TomasVotruba TomasVotruba deleted the skip-empty-check branch January 19, 2022 09:01
@TomasVotruba
Copy link
Member

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants