diff --git a/phpstan.neon b/phpstan.neon index 8321117bd09..0a2f7a73fa0 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -408,3 +408,8 @@ parameters: - identifier: rector.noOnlyNullReturnInRefactor path: rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php + + # handle next with FileNode + - + identifier: method.parentMethodFinalByPhpDoc + path: rules/TypeDeclaration/Rector/StmtsAwareInterface/DeclareStrictTypesRector.php diff --git a/src/Rector/AbstractRector.php b/src/Rector/AbstractRector.php index abcc15b6662..6d0e317e12d 100644 --- a/src/Rector/AbstractRector.php +++ b/src/Rector/AbstractRector.php @@ -106,6 +106,10 @@ public function autowire( } /** + * @final Avoid override to prevent unintended side-effects. Use enterNode() or @see \Rector\Contract\PhpParser\DecoratingNodeVisitorInterface instead. + * + * @internal + * * @return Node[]|null */ public function beforeTraverse(array $nodes): ?array