diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Fixture/skip_override_from_parent.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Fixture/skip_override_from_parent.php.inc new file mode 100644 index 00000000000..cf89aa8b805 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Fixture/skip_override_from_parent.php.inc @@ -0,0 +1,13 @@ +number = $number; + } +} diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Source/ParentWithNumber.php b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Source/ParentWithNumber.php new file mode 100644 index 00000000000..a2b54fcc826 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamTypeFromPropertyTypeRector/Source/ParentWithNumber.php @@ -0,0 +1,10 @@ +parentClassMethodTypeOverrideGuard->hasParentClassMethod($node)) { + return null; + } + $param->type = $paramType; $hasChanged = true; }