From 912487ba8d363ef90043d3500f2d0c42041f298f Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sat, 18 Nov 2023 02:19:29 +0000 Subject: [PATCH] Updated Rector to commit 4a3e6982647ce4fdc84b1232557eaeae7e914bde https://github.com/rectorphp/rector-src/commit/4a3e6982647ce4fdc84b1232557eaeae7e914bde [DeadCode] Skip multi no stmts on RemoveDuplicatedCaseInSwitchRector (#5258) --- .../Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php | 3 +++ src/Application/VersionResolver.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 */