diff --git a/rector.php b/rector.php index 60913b1..b145f79 100644 --- a/rector.php +++ b/rector.php @@ -4,22 +4,21 @@ use Rector\Config\RectorConfig; use Rector\PHPUnit\Set\PHPUnitSetList; -use Rector\Set\ValueObject\LevelSetList; -use Rector\Set\ValueObject\SetList; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_81, - SetList::CODE_QUALITY, - SetList::CODING_STYLE, - SetList::DEAD_CODE, - SetList::NAMING, - SetList::PRIVATIZATION, - SetList::TYPE_DECLARATION, +return RectorConfig::configure() + ->withPhpSets(php81: true) + ->withPreparedSets( + codeQuality: true, + codingStyle: true, + deadCode: true, + naming: true, + privatization: true, + typeDeclarations: true + ) + ->withSets([ PHPUnitSetList::PHPUNIT_100, - ]); - - $rectorConfig->parallel(); - $rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests', __FILE__]); - $rectorConfig->importNames(); -}; + ]) + ->withParallel() + ->withRootFiles() + ->withPaths([__DIR__ . '/src', __DIR__ . '/tests']) + ->withImportNames();