diff --git a/rules-tests/DeadCode/Rector/ClassMethod/RemoveParentDelegatingClassMethodRector/Fixture/skip_annotation_docblock.php.inc b/rules-tests/DeadCode/Rector/ClassMethod/RemoveParentDelegatingClassMethodRector/Fixture/skip_annotation_docblock.php.inc new file mode 100644 index 00000000000..eaae5156a21 --- /dev/null +++ b/rules-tests/DeadCode/Rector/ClassMethod/RemoveParentDelegatingClassMethodRector/Fixture/skip_annotation_docblock.php.inc @@ -0,0 +1,16 @@ +phpDocInfoFactory->createFromNodeOrEmpty($classMethod); - - return $phpDocInfo->hasByNames( - [ - '@param', - '@phpstan-param', - '@psalm-param', - '@return', - '@phpstan-return', - '@psalm-return', - '@deprecated', - ] - ); + return array_any($phpDocInfo->getPhpDocNode()->children, fn(PhpDocChildNode $phpDocChildNode): bool => $phpDocChildNode instanceof PhpDocTagNode); } private function matchParentMethodReflection(ClassMethod $classMethod): ?ExtendedMethodReflection