diff --git a/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php b/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php deleted file mode 100644 index b8111cc736f..00000000000 --- a/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php +++ /dev/null @@ -1,80 +0,0 @@ - $configuration - */ - public function configure(array $configuration): void - { - } - - public function getRuleDefinition(): RuleDefinition - { - return new RuleDefinition('Change empty() check to explicit strict comparisons', [ - new ConfiguredCodeSample( - <<<'CODE_SAMPLE' -final class SomeEmptyArray -{ - public function run(array $items) - { - return empty($items); - } -} -CODE_SAMPLE - , - <<<'CODE_SAMPLE' -final class SomeEmptyArray -{ - public function run(array $items) - { - return $items === []; - } -} -CODE_SAMPLE - , - [ - self::TREAT_AS_NON_EMPTY => false, - ] - ), - ]); - } - - /** - * @return array> - */ - public function getNodeTypes(): array - { - return [Empty_::class, BooleanNot::class]; - } - - /** - * @param Empty_|BooleanNot $node - */ - public function refactor(Node $node): ?Node - { - throw new ShouldNotHappenException(sprintf( - '"%s" rule is deprecated, as it creates unreadable code with messy checks; refactor the value to a sole type instead', - self::class - )); - } -}