Repository navigation
[DeadCode] Skip abstract method on RemoveUnusedPublicMethodParameterRector - #7002
Conversation
|
|
||
| namespace Rector\Tests\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector\FixtureTreatClassesAsFinal; | ||
|
|
||
| abstract class SkipAbstractMethod |
There was a problem hiding this comment.
@TomasVotruba abstract method only exists in abstract class, this means in other rules, the check $class->isAbstract() is needed as well, since abstract never be "final".
There was a problem hiding this comment.
I will create separate PR for add is abstract check on "treat final class" since abstract never be "final"
There was a problem hiding this comment.
I created separate PR for always verify class is abstract before FeatureFlags::treatClassesAsFinal() check at PR:
| public static function reset(): void | ||
| { | ||
| SimpleParameterProvider::setParameter(Option::TREAT_CLASSES_AS_FINAL, false); | ||
| } |
There was a problem hiding this comment.
I just moved this reset functionality to AbstractRectorTestCase::tearDownAfterClass
|
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
It happen when
->withTreatClassesAsFinal();is used, which non-final class can have abstract method to be implemented by child.