From 915208d81074657171ddafc433574f8a6ac2e394 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 17 Nov 2026 16:53:25 +0100 Subject: [PATCH] [Naming] Remove deprecated RenameVariableToMatchNewTypeRector --- .../RenameVariableToMatchNewTypeRector.php | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php diff --git a/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php b/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php deleted file mode 100644 index b3e4c7fb561..00000000000 --- a/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php +++ /dev/null @@ -1,67 +0,0 @@ -advance(); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -final class SomeClass -{ - public function run() - { - $dreamSearch = new DreamSearch(); - $dreamSearch->advance(); - } -} -CODE_SAMPLE - ), - ]); - } - - /** - * @return array> - */ - public function getNodeTypes(): array - { - return [ClassMethod::class]; - } - - /** - * @param ClassMethod $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as it belongs to coding standard rather than refactoring and can cause conflicting variable names', - self::class - )); - } -}