From 2665992c170b71c03458315bfc1ae2264d68e926 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 26 Aug 2021 18:13:17 +0700 Subject: [PATCH] [Scoper] Exclude parent return on DowngradeStaticTypeDeclarationRector (#769) --- .../Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }