diff --git a/composer.json b/composer.json index 032bceb95a7..3694a42b17b 100644 --- a/composer.json +++ b/composer.json @@ -90,7 +90,8 @@ "classmap": [ "stubs", "rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source", - "rules-tests/Renaming/Rector/Name/RenameClassRector/Source" + "rules-tests/Renaming/Rector/Name/RenameClassRector/Source", + "rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Source" ], "files": [ "tests/debug_functions.php", diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Fixture/with_other_method_from_parent.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Fixture/with_other_method_from_parent.php.inc new file mode 100644 index 00000000000..565999ee96b --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Fixture/with_other_method_from_parent.php.inc @@ -0,0 +1,37 @@ + +----- + diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Source/ParentClassOtherMethod.php b/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Source/ParentClassOtherMethod.php new file mode 100644 index 00000000000..1bd7bc18e19 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/KnownMagicClassMethodTypeRector/Source/ParentClassOtherMethod.php @@ -0,0 +1,10 @@ +parentClassMethodTypeOverrideGuard->hasParentClassMethod($classMethod)) { - return null; + continue; } if ($this->isNames($classMethod, [MethodName::CALL, MethodName::CALL_STATIC])) {