-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
AddMethodCallBasedStrictParamTypeRector: Support changing protected methods in final classes #4611
Conversation
|
if (! $method->isPrivate()) { | ||
$isPrivate = | ||
($node->isFinal() | ||
&& $node->extends === null |
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.
$node->implements
empty should be checked as well, also probably used by/from trait.
service from Parent override guard or FamilyTree services may be can be used for this case
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.
good point. added a test-case and fixed it
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 did not use the suggested services, as I think pure AST based decision are more reliable right now
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.
Ok, lets use this as initial support and then we can improve later with verify parent FullyQualified->toString() is autoloaded
Thank you @staabm |
No description provided.