Skip to content

Commit

Permalink
[DeadCode] Ensure $hasChanged not replaced on next iteration when it …
Browse files Browse the repository at this point in the history
…assigned to true on RemoveUnusedPrivateMethodParameterRector (#5009)
  • Loading branch information
samsonasik committed Sep 12, 2023
1 parent 09baf7d commit 7e2bc14
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -220,7 +220,10 @@ private function clearPhpDocInfo(ClassMethod $classMethod, array $unusedParamete
continue;
}

$hasChanged = $this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $paramTagValueNode);
$hasTagRemoved = $this->phpDocTagRemover->removeTagValueFromNode($phpDocInfo, $paramTagValueNode);
if ($hasTagRemoved) {
$hasChanged = true;
}
}

if ($hasChanged) {
Expand Down

0 comments on commit 7e2bc14

Please sign in to comment.