-
-
Notifications
You must be signed in to change notification settings - Fork 431
FinalPropertyPromotionRector #7231
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
Conversation
|
I guess we need to discuss first when it actually needed, eg:
|
|
It needs public function getNodeTypes(): array
{
return [Class_::class];
} |
|
Yes |
...hp85/Rector/Class_/FinalPropertyPromotionRector/Fixture/skip_child_from_final_parent.php.inc
Outdated
Show resolved
Hide resolved
|
Looking at the change, it seems you're trying to change |
|
Thanks for the feedback. I understand your concern. I thought converting @Final to the native final keyword would help modernize code, but I agree it might need more input from community about real-world use cases. |
samsonasik
left a comment
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.
It seems you copy paste logic from other rules, please remove the unnecessary unrelated logic, focus only on this rule purpose, and also no need separate service for only used once logic.
Ok. |
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
...-tests/Php85/Rector/Class_/FinalPropertyPromotionRector/Fixture/skip_anonymous_class.php.inc
Outdated
Show resolved
Hide resolved
tests/Issues/AutoImport/Fixture/sub_namespace_dockblock_imported.php
Outdated
Show resolved
Hide resolved
00f2511 to
7407a58
Compare
|
Please check it |
|
as I tell before, let it sit here for a while, this may need more discussion if it is actually needed in real project. |
|
I'm thinking about this rule again, it doesn't seem to be good enough in Rector core. This is a great candidate for local custom rule though 👍 |
No description provided.