|
5 | 5 | use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector; |
6 | 6 | use Rector\CodingStyle\Rector\ClassConst\RemoveFinalFromConstRector; |
7 | 7 | use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector; |
8 | | -use Rector\Core\Configuration\Option; |
| 8 | +use Rector\Config\RectorConfig; |
9 | 9 | use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector; |
10 | 10 | use Rector\Set\ValueObject\LevelSetList; |
11 | 11 | use Rector\Set\ValueObject\SetList; |
12 | | -use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
13 | 12 |
|
14 | | -return static function (ContainerConfigurator $containerConfigurator): void { |
15 | | - $containerConfigurator->import(LevelSetList::UP_TO_PHP_80); |
16 | | - $containerConfigurator->import(SetList::CODE_QUALITY); |
17 | | - $containerConfigurator->import(SetList::CODING_STYLE); |
18 | | - $containerConfigurator->import(SetList::DEAD_CODE); |
19 | | - $containerConfigurator->import(SetList::NAMING); |
20 | | - $containerConfigurator->import(SetList::PRIVATIZATION); |
21 | | - $containerConfigurator->import(SetList::PSR_4); |
22 | | - $containerConfigurator->import(SetList::TYPE_DECLARATION); |
23 | | - $containerConfigurator->import(SetList::TYPE_DECLARATION_STRICT); |
24 | | - |
25 | | - $parameters = $containerConfigurator->parameters(); |
26 | | - $parameters->set(Option::PARALLEL, true); |
27 | | - $parameters->set(Option::PATHS, [__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/spec']); |
28 | | - $parameters->set(Option::AUTO_IMPORT_NAMES, true); |
| 13 | +return static function (RectorConfig $rectorConfig): void { |
| 14 | + $rectorConfig->sets([ |
| 15 | + LevelSetList::UP_TO_PHP_80, |
| 16 | + SetList::CODE_QUALITY, |
| 17 | + SetList::CODING_STYLE, |
| 18 | + SetList::DEAD_CODE, |
| 19 | + SetList::NAMING, |
| 20 | + SetList::PRIVATIZATION, |
| 21 | + SetList::PSR_4, |
| 22 | + SetList::TYPE_DECLARATION, |
| 23 | + SetList::TYPE_DECLARATION_STRICT, |
| 24 | + ]); |
29 | 25 |
|
30 | | - $parameters->set(Option::SKIP, [ |
| 26 | + $rectorConfig->parallel(); |
| 27 | + $rectorConfig->paths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/spec', __DIR__ . '/rector.php']); |
| 28 | + $rectorConfig->importNames(); |
| 29 | + $rectorConfig->skip([ |
31 | 30 | __DIR__ . '/src/Controller', |
32 | 31 | __DIR__ . '/src/Middleware/Routed/Preview', |
33 | 32 | CallableThisArrayToAnonymousFunctionRector::class, |
|
0 commit comments