diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AbstractParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AbstractParamTypeByMethodCallTypeRector.php deleted file mode 100644 index 5cb376aacb2..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/AbstractParamTypeByMethodCallTypeRector.php +++ /dev/null @@ -1,35 +0,0 @@ -> - */ - public function getNodeTypes(): array - { - return [ClassMethod::class, Function_::class, Closure::class, ArrowFunction::class]; - } - - /** - * @param ClassMethod|Function_|Closure|ArrowFunction $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as it fills invalid types and can cause type errors on controllers and other input calls; use static analysis to verify types instead', - static::class - )); - } -} diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ArrayParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ArrayParamTypeByMethodCallTypeRector.php deleted file mode 100644 index aba24700473..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/ArrayParamTypeByMethodCallTypeRector.php +++ /dev/null @@ -1,66 +0,0 @@ -someTypedService->run($value); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeTypedService -{ - public function run(array $values) - { - } -} - -final class UseDependency -{ - public function __construct( - private SomeTypedService $someTypedService - ) { - } - - public function go(array $value) - { - $this->someTypedService->run($value); - } -} -CODE_SAMPLE - ), - ]); - } -} diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ObjectParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ObjectParamTypeByMethodCallTypeRector.php deleted file mode 100644 index 5a28a242262..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/ObjectParamTypeByMethodCallTypeRector.php +++ /dev/null @@ -1,66 +0,0 @@ -someTypedService->run($value); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeTypedService -{ - public function run(SomeObject $object) - { - } -} - -final class UseDependency -{ - public function __construct( - private SomeTypedService $someTypedService - ) { - } - - public function go(SomeObject $value) - { - $this->someTypedService->run($value); - } -} -CODE_SAMPLE - ), - ]); - } -} diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php deleted file mode 100644 index 0b6ded5a7b8..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php +++ /dev/null @@ -1,66 +0,0 @@ -someTypedService->run($value); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeTypedService -{ - public function run(iterable $values) - { - } -} - -final class UseDependency -{ - public function __construct( - private SomeTypedService $someTypedService - ) { - } - - public function go(iterable $value) - { - $this->someTypedService->run($value); - } -} -CODE_SAMPLE - ), - ]); - } -} diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ScalarParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ScalarParamTypeByMethodCallTypeRector.php deleted file mode 100644 index 06e42fbdc04..00000000000 --- a/rules/TypeDeclaration/Rector/ClassMethod/ScalarParamTypeByMethodCallTypeRector.php +++ /dev/null @@ -1,66 +0,0 @@ -someTypedService->run($value); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeTypedService -{ - public function run(int $value) - { - } -} - -final class UseDependency -{ - public function __construct( - private SomeTypedService $someTypedService - ) { - } - - public function go(int $value) - { - $this->someTypedService->run($value); - } -} -CODE_SAMPLE - ), - ]); - } -}