diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index c2ad3dfa2f6..b0cff8da5cb 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -73,7 +73,7 @@ public function getStatic() */ public function refactor(Node $node): ?Node { - if ($node->returnType instanceof Name && $this->nodeNameResolver->isName($node->returnType, 'self')) { + if ($node->returnType instanceof Name && $this->nodeNameResolver->isNames($node->returnType, ['self', 'parent'])) { return null; }