Skip to content

Commit

Permalink
Merge pull request #13 from samsonasik/use-new-syntax-rector-config
Browse files Browse the repository at this point in the history
 [Rector] Use new RectorConfig::configure()
  • Loading branch information
samsonasik authored Feb 29, 2024
2 parents d1e027a + fa8d642 commit 14cc25b
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit 14cc25b

Please sign in to comment.