Skip to content

Commit 405de11

Browse files
committed
Only remove @Covers when target exists
1 parent 90755cf commit 405de11

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rules/AnnotationsToAttributes/Rector/Class_/CoversAnnotationWithValueToAttributeRector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,8 @@ private function handleCovers(PhpDocInfo $phpDocInfo, bool $hasCoversDefault): a
248248
}
249249

250250
$attributeGroups[$covers] = $attributeGroup;
251+
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $desiredTagValueNode);
251252
}
252-
253-
$this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $desiredTagValueNode);
254253
}
255254

256255
return $attributeGroups;

0 commit comments

Comments
 (0)