diff --git a/rules-tests/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector/Fixture/skip_self.php.inc b/rules-tests/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector/Fixture/skip_self.php.inc new file mode 100644 index 00000000000..97fcc047b9a --- /dev/null +++ b/rules-tests/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector/Fixture/skip_self.php.inc @@ -0,0 +1,13 @@ +returnType instanceof Name && $this->nodeNameResolver->isName( + $node->returnType, + 'self' + )) { + return null; + } + $scope = $node->getAttribute(AttributeKey::SCOPE); if ($scope === null) { $className = $node->getAttribute(AttributeKey::CLASS_NAME);