diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Fixture/skip_has_parent_method.php.inc b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Fixture/skip_has_parent_method.php.inc new file mode 100644 index 00000000000..440c7b5d479 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Fixture/skip_has_parent_method.php.inc @@ -0,0 +1,18 @@ + 'Firstitem', + 'second' => 'Seconditem', + ]; + + return $items[$key]; + } +} diff --git a/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Source/SomeParentMethod.php b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Source/SomeParentMethod.php new file mode 100644 index 00000000000..a611d6df148 --- /dev/null +++ b/rules-tests/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector/Source/SomeParentMethod.php @@ -0,0 +1,12 @@ +parentClassMethodTypeOverrideGuard->hasParentClassMethod($classMethod)) { + continue; + } + foreach ($classMethod->getParams() as $param) { if ($param->type instanceof Node) { continue;