|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
5 | 5 | use Rector\Config\RectorConfig; |
6 | | -use Rector\PHPUnit\Set\PHPUnitSetList; |
7 | | -use Rector\Set\ValueObject\LevelSetList; |
8 | | -use Rector\Set\ValueObject\SetList; |
9 | | - |
10 | | -return static function (RectorConfig $rectorConfig): void { |
11 | | - $rectorConfig->sets([ |
12 | | - PHPUnitSetList::PHPUNIT_100, |
13 | | - SetList::CODE_QUALITY, |
14 | | - SetList::DEAD_CODE, |
15 | | - LevelSetList::UP_TO_PHP_81, |
16 | | - SetList::CODING_STYLE, |
17 | | - SetList::TYPE_DECLARATION, |
18 | | - SetList::NAMING, |
19 | | - SetList::PRIVATIZATION, |
20 | | - SetList::EARLY_RETURN, |
21 | | - PHPUnitSetList::PHPUNIT_CODE_QUALITY, |
22 | | - ]); |
23 | | - |
24 | | - $rectorConfig->paths([ |
25 | | - __DIR__ . '/config', |
26 | | - __DIR__ . '/src', |
27 | | - __DIR__ . '/tests', |
28 | | - ]); |
29 | | - |
30 | | - $rectorConfig->importNames(); |
31 | | - |
32 | | - $rectorConfig->skip([ |
| 6 | +use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; |
| 7 | + |
| 8 | +return RectorConfig::configure() |
| 9 | + ->withPhpSets() |
| 10 | + ->withPreparedSets(codeQuality: true, deadCode: true, codingStyle: true, typeDeclarations: true, naming: true, privatization: true, earlyReturn: true, phpunitCodeQuality: true) |
| 11 | + ->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests']) |
| 12 | + ->withRootFiles() |
| 13 | + ->withImportNames() |
| 14 | + ->withSkip([ |
33 | 15 | '*/Source/*', |
34 | 16 | '*/Fixture/*', |
35 | | - |
36 | | - \Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => [ |
| 17 | + StringClassNameToClassConstantRector::class => [ |
37 | 18 | __DIR__ . '/tests/Naming/ClassToSuffixResolverTest.php', |
38 | 19 | __DIR__ . '/tests/Rules/Rector/PhpUpgradeImplementsMinPhpVersionInterfaceRule/PhpUpgradeImplementsMinPhpVersionInterfaceRuleTest.php', |
39 | 20 | ], |
40 | 21 | ]); |
41 | | - |
42 | | - $rectorConfig->ruleWithConfiguration(\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class, [ |
43 | | - 'Symfony\Component\Console\*', |
44 | | - 'Rector\Contract\Rector\ConfigurableRectorInterface', |
45 | | - ]); |
46 | | -}; |
0 commit comments