Skip to content

Commit

Permalink
[DX] Move FlipNegatedTernaryInstanceofRector to instanceof rules cate…
Browse files Browse the repository at this point in the history
…gory (#4663)
  • Loading branch information
TomasVotruba committed Aug 5, 2023
1 parent 637d48c commit 7a48653
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/set/instanceof.php
Expand Up @@ -7,9 +7,9 @@
use Rector\CodeQuality\Rector\Identical\GetClassToInstanceOfRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector;
use Rector\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector;
use Rector\TypeDeclaration\Rector\BooleanAnd\BinaryOpNullableToInstanceofRector;
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
use Rector\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector;
use Rector\TypeDeclaration\Rector\While_\WhileNullableToInstanceofRector;

return static function (RectorConfig $rectorConfig): void {
Expand Down
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Rector\Tests\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector;
namespace Rector\Tests\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
Expand Down
Expand Up @@ -4,7 +4,7 @@

use Rector\Config\RectorConfig;

use Rector\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector;
use Rector\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(FlipNegatedTernaryInstanceofRector::class);
Expand Down
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Rector\TypeDeclaration\Rector\Ternary;
namespace Rector\Instanceof_\Rector\Ternary;

use PhpParser\Node;
use PhpParser\Node\Expr;
Expand All @@ -14,7 +14,7 @@
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;

/**
* @see \Rector\Tests\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector\FlipNegatedTernaryInstanceofRectorTest
* @see \Rector\Tests\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector\FlipNegatedTernaryInstanceofRectorTest
*/
final class FlipNegatedTernaryInstanceofRector extends AbstractRector
{
Expand Down
3 changes: 1 addition & 2 deletions utils/Command/MissingInSetCommand.php
Expand Up @@ -9,7 +9,6 @@
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
use Rector\TypeDeclaration\Rector\BooleanAnd\BinaryOpNullableToInstanceofRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Rector\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector;
use Rector\TypeDeclaration\Rector\While_\WhileNullableToInstanceofRector;
use Rector\Utils\Finder\RectorClassFinder;
use Rector\Utils\Finder\SetRectorClassesResolver;
Expand Down Expand Up @@ -45,6 +44,7 @@ final class MissingInSetCommand extends Command
__DIR__ . '/../../rules/Php81/Rector' => __DIR__ . '/../../config/set/php81.php',
__DIR__ . '/../../rules/Php82/Rector' => __DIR__ . '/../../config/set/php82.php',
__DIR__ . '/../../rules/Strict/Rector' => __DIR__ . '/../../config/set/strict-booleans.php',
__DIR__ . '/../../rules/Instanceof_/Rector' => __DIR__ . '/../../config/set/instanceof.php',

// doctrine
__DIR__ . '/../../vendor/rector/rector-doctrine/rules/CodeQuality' => __DIR__ . '/../../vendor/rector/rector-doctrine/config/sets/doctrine-code-quality.php',
Expand Down Expand Up @@ -94,7 +94,6 @@ final class MissingInSetCommand extends Command
DeclareStrictTypesRector::class,
// optional
DataProviderArrayItemsNewlinedRector::class,
FlipNegatedTernaryInstanceofRector::class,
BinaryOpNullableToInstanceofRector::class,
WhileNullableToInstanceofRector::class,
];
Expand Down

0 comments on commit 7a48653

Please sign in to comment.