From a903c67a60ffe55437c988b8bce87108f27ae54c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 17 Nov 2026 16:54:10 +0100 Subject: [PATCH] [CodeQuality] Remove deprecated SwitchTrueToMatchRector --- .../Switch_/SwitchTrueToMatchRector.php | 77 ------------------- 1 file changed, 77 deletions(-) delete mode 100644 rules/CodeQuality/Rector/Switch_/SwitchTrueToMatchRector.php diff --git a/rules/CodeQuality/Rector/Switch_/SwitchTrueToMatchRector.php b/rules/CodeQuality/Rector/Switch_/SwitchTrueToMatchRector.php deleted file mode 100644 index 8af3e5d7ecb..00000000000 --- a/rules/CodeQuality/Rector/Switch_/SwitchTrueToMatchRector.php +++ /dev/null @@ -1,77 +0,0 @@ - 'no', - $value === 1 => 'yes', - default => 'maybe', - }; - } -} -CODE_SAMPLE - ), - ]); - } - - /** - * @return array> - */ - public function getNodeTypes(): array - { - return [Switch_::class]; - } - - /** - * @param Switch_ $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as both switch (true) and match (true) are hacky constructions that need a human check', - self::class - )); - } -}