diff --git a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php index 78ec5a2fe40..7820a593660 100644 --- a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php +++ b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php @@ -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;