FinalMethodRule
Slamdunk opened this issue · comments
Hi, following FinalRule
for classes I would propose FinalMethodRule
for public methods of abstract classes, see https://slamdunk.github.io/blog/when-to-declare-methods-final/
I have a phpstan-extension package too but yours is more focused on strictness, so such a rule would fit better here.
Would you consider a PR for this topic?
Of course the rule would only be active with:
parameters:
allowAbstractClasses: true
Love it, great idea!
Have I already spotted a use-case?
https://github.com/localheinz/phpstan-rules/blob/51d8c8ebc14ef4dec045db03de309aebd2097343/test/Integration/AbstractTestCase.php#L44
😃
Note to self: related PHP-CS-Fixer rule https://github.com/Slamdunk/php-cs-fixer-extensions/blob/v1.19.0/lib/FinalAbstractPublicFixer.php
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.