Skip to content

Commit 0324c77

Browse files
committed
check exists
1 parent a61707c commit 0324c77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,10 @@ private function removeMethodCoversAnnotations(ClassMethod $classMethod): bool
303303
continue;
304304
}
305305

306+
if (str_contains($desiredTagValueNode->value->value, '::') && ! $this->reflectionProvider->hasClass(self::COVERS_METHOD_ATTRIBUTE)) {
307+
continue;
308+
}
309+
306310
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $desiredTagValueNode);
307311
$hasChanged = true;
308312
}

0 commit comments

Comments
 (0)