-
-
Notifications
You must be signed in to change notification settings - Fork 370
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] Handle RemoveUnusedPrivateMethodRector+RemoveDuplicatedIfReturnRector when private method used in FuncCall with ArrowFunction #3007
Conversation
…eturnRector when private method used in array_map
Fixed 🎉 /cc @alcohol |
All checks have passed 🎉 @TomasVotruba it is ready for review. |
The issue seems not about |
a073b84
to
ba39cbe
Compare
It seems can be resolved by verify node has parent for ParentConnectingVisitor on |
All checks have passed 🎉 @TomasVotruba I think it is ready. |
Ok, I got it, the return [new Node\Stmt\Return_($this->expr)] while the It can be correctly handled by check |
All checks have passed 🎉 @TomasVotruba I think it is ready. |
Thank you 😊 |
Given the following code:
It currently remove the private method, which should not, as it used. Applied rules:
Ref https://getrector.org/demo/66d03737-04b4-4345-89e5-074046ba496c
This PR try to fix it. Fixes rectorphp/rector#7547