diff --git a/rules/Php82/Rector/Param/AddSensitiveParameterAttributeRector.php b/rules/Php82/Rector/Param/AddSensitiveParameterAttributeRector.php deleted file mode 100644 index c6692b71252..00000000000 --- a/rules/Php82/Rector/Param/AddSensitiveParameterAttributeRector.php +++ /dev/null @@ -1,85 +0,0 @@ - $configuration - */ - public function configure(array $configuration): void - { - } - - public function getNodeTypes(): array - { - return [Param::class]; - } - - /** - * @param Node\Param $node - */ - public function refactor(Node $node): ?Param - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as matching sensitive parameters by name is vague and risky. Add the #[\SensitiveParameter] attribute per case instead', - self::class - )); - } - - public function getRuleDefinition(): RuleDefinition - { - return new RuleDefinition( - 'Add SensitiveParameter attribute to method and function configured parameters', - [ - new ConfiguredCodeSample( - <<<'CODE_SAMPLE' -class SomeClass -{ - public function run(string $password) - { - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -class SomeClass -{ - public function run(#[\SensitiveParameter] string $password) - { - } -} -CODE_SAMPLE - , - [ - self::SENSITIVE_PARAMETERS => ['password'], - ] - ), - - ] - ); - } - - public function provideMinPhpVersion(): int - { - return PhpVersion::PHP_82; - } -}