diff --git a/rules/Unambiguous/Rector/Class_/RemoveReturnThisFromSetterClassMethodRector.php b/rules/Unambiguous/Rector/Class_/RemoveReturnThisFromSetterClassMethodRector.php deleted file mode 100644 index 26aad89e7ea..00000000000 --- a/rules/Unambiguous/Rector/Class_/RemoveReturnThisFromSetterClassMethodRector.php +++ /dev/null @@ -1,73 +0,0 @@ -name = $name; - return $this; - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeClass -{ - private $name; - - public function setName(string $name): void - { - $this->name = $name; - } -} -CODE_SAMPLE - ), - ] - ); - } - - /** - * @return array> - */ - public function getNodeTypes(): array - { - return [Class_::class]; - } - - /** - * @param Class_ $node - */ - public function refactor(Node $node): ?Class_ - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as removing "return $this" from a setter needs a more complex approach that depends on the use case', - self::class - )); - } -}