Skip to content

Commit 27b6122

Browse files
committed
[Rector] Use new RectorConfig::configure()
1 parent d1e027a commit 27b6122

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

rector.php

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44

55
use Rector\Config\RectorConfig;
66
use Rector\PHPUnit\Set\PHPUnitSetList;
7-
use Rector\Set\ValueObject\LevelSetList;
8-
use Rector\Set\ValueObject\SetList;
97

10-
return static function (RectorConfig $rectorConfig): void {
11-
$rectorConfig->sets([
12-
LevelSetList::UP_TO_PHP_81,
13-
SetList::CODE_QUALITY,
14-
SetList::CODING_STYLE,
15-
SetList::DEAD_CODE,
16-
SetList::NAMING,
17-
SetList::PRIVATIZATION,
18-
SetList::TYPE_DECLARATION,
8+
return RectorConfig::configure()
9+
->withPhpSets(php81: true)
10+
->withPreparedSets(
11+
codeQuality: true,
12+
codingStyle: true,
13+
deadCode: true,
14+
naming: true,
15+
privatization: true,
16+
typeDeclarations: true
17+
)
18+
->withSets([
1919
PHPUnitSetList::PHPUNIT_100,
20-
]);
21-
22-
$rectorConfig->parallel();
23-
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests', __FILE__]);
24-
$rectorConfig->importNames();
25-
};
20+
])
21+
->withParallel()
22+
->withPaths([__DIR__ . '/src', __DIR__ . '/tests', __FILE__])
23+
->withImportNames();

0 commit comments

Comments
 (0)