diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnArrayDocblockBasedOnArrayMapRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddReturnArrayDocblockBasedOnArrayMapRector.php deleted file mode 100644 index 0eaa19d5f04..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnArrayDocblockBasedOnArrayMapRector.php +++ /dev/null @@ -1,72 +0,0 @@ -id; - }, $items); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeClass -{ - /** - * @return int[] - */ - public function getItems(array $items) - { - return array_map(function ($item): int { - return $item->id; - }, $items); - } -} -CODE_SAMPLE - )], - ); - } - - public function getNodeTypes(): array - { - return [ClassMethod::class, Function_::class]; - } - - /** - * @param ClassMethod|Function_ $node - */ - public function refactor(Node $node): null|Function_|ClassMethod - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as too niche and of little practical value. The item type is already known from the inline closure return type', - self::class - )); - } -} diff --git a/rules/TypeDeclaration/Rector/ClassMethod/StrictStringParamConcatRector.php b/rules/TypeDeclaration/Rector/ClassMethod/StrictStringParamConcatRector.php deleted file mode 100644 index c61f837349e..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/StrictStringParamConcatRector.php +++ /dev/null @@ -1,74 +0,0 @@ -> - */ - public function getNodeTypes(): array - { - return [ClassMethod::class, Function_::class, Closure::class]; - } - - public function provideMinPhpVersion(): int - { - return PhpVersion::PHP_70; - } - - /** - * @param ClassMethod|Function_|Closure $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" is deprecated as it produces too many false positives. Add the type manually where needed instead', - self::class - )); - } -}