diff --git a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php index 9dcfd2cd46d..d42dbe86819 100644 --- a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php +++ b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php @@ -85,6 +85,9 @@ CODE_SAMPLE { $totalKeys = \count($switch->cases); foreach (\array_keys($switch->cases) as $key) { + if (isset($switch->cases[$key - 1]) && $switch->cases[$key - 1]->stmts === []) { + continue; + } $nextCases = []; for ($jumpToKey = $key + 1; $jumpToKey < $totalKeys; ++$jumpToKey) { if (!isset($switch->cases[$jumpToKey])) { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 8daa55f02f8..897531c9551 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '0.18.10'; + public const PACKAGE_VERSION = '4a3e6982647ce4fdc84b1232557eaeae7e914bde'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-11-17 02:36:50'; + public const RELEASE_DATE = '2023-11-18 09:17:20'; /** * @var int */