Skip to content

Commit

Permalink
[DeadCode] Ensure change hasChanged flag on RemoveDuplicatedCaseInSwi…
Browse files Browse the repository at this point in the history
…tchRector (#5237)
  • Loading branch information
samsonasik authored Nov 10, 2023
1 parent bee1dae commit b0d4b15
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ private function insertCaseByKeys(Switch_ $switch, array $insertByKeys): void
foreach ($switch->cases as $case) {
if ($previousCase instanceof Case_ && $this->areSwitchStmtsEqualsAndWithBreak($case, $previousCase)) {
$previousCase->stmts = [];
$this->hasChanged = true;
}

$previousCase = $case;
Expand Down

0 comments on commit b0d4b15

Please sign in to comment.