|
3 | 3 | declare(strict_types=1);
|
4 | 4 |
|
5 | 5 | use Rector\Config\RectorConfig;
|
6 |
| -use Rector\Nette\Set\NetteSetList; |
7 |
| -use Rector\Set\ValueObject\SetList; |
8 |
| -use Rector\Core\Configuration\Option; |
9 | 6 | use Rector\Symfony\Set\SymfonySetList;
|
10 | 7 | use Rector\Doctrine\Set\DoctrineSetList;
|
11 | 8 | use Rector\Set\ValueObject\LevelSetList;
|
12 |
| -use Rector\Symfony\Set\SensiolabsSetList; |
13 |
| -use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector; |
14 | 9 | use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
|
15 |
| -use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector; |
16 |
| -use Rector\TypeDeclaration\Rector\Property\PropertyTypeDeclarationRector; |
17 |
| -use Rector\TypeDeclaration\Rector\FunctionLike\ParamTypeDeclarationRector; |
18 | 10 | use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
|
19 | 11 | use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
|
20 | 12 | use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
|
|
24 | 16 | use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
|
25 | 17 | use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
|
26 | 18 | use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
|
27 |
| -use Rector\TypeDeclaration\Rector\ClassMethod\ArrayShapeFromConstantArrayReturnRector; |
28 | 19 | use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
|
29 |
| -use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeFuncCallRector; |
30 |
| - |
31 | 20 |
|
32 | 21 | return static function (RectorConfig $rectorConfig): void {
|
33 | 22 | $rectorConfig->paths([
|
34 | 23 | __DIR__ . '/lib'
|
35 | 24 | ]);
|
36 | 25 |
|
37 |
| - $parameters = $rectorConfig->parameters(); |
38 |
| - $parameters->set( |
39 |
| - Option::SYMFONY_CONTAINER_XML_PATH_PARAMETER, |
40 |
| - __DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml' |
41 |
| - ); |
| 26 | + $rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/App_KernelDevDebugContainer.xml'); |
42 | 27 |
|
43 | 28 | $rectorConfig->sets([
|
44 | 29 | DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
45 | 30 | SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES,
|
46 |
| - NetteSetList::ANNOTATIONS_TO_ATTRIBUTES, |
47 |
| - SensiolabsSetList::FRAMEWORK_EXTRA_61, |
48 | 31 | SymfonySetList::SYMFONY_60,
|
49 | 32 | LevelSetList::UP_TO_PHP_81
|
50 | 33 | ]);
|
|
53 | 36 | $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
54 | 37 | $rectorConfig->rule(AddReturnTypeDeclarationRector::class);
|
55 | 38 | $rectorConfig->rules([
|
56 |
| - AddArrayParamDocTypeRector::class, |
57 | 39 | AddMethodCallBasedStrictParamTypeRector::class,
|
58 | 40 | AddVoidReturnTypeWhereNoReturnRector::class,
|
59 |
| - ArrayShapeFromConstantArrayReturnRector::class, |
60 | 41 | ParamTypeByMethodCallTypeRector::class,
|
61 | 42 | ParamTypeByParentCallTypeRector::class,
|
62 |
| - ParamTypeDeclarationRector::class, |
63 |
| - PropertyTypeDeclarationRector::class, |
64 | 43 | RemoveUselessParamTagRector::class,
|
65 | 44 | ReturnTypeFromReturnNewRector::class,
|
66 | 45 | ReturnTypeFromStrictBoolReturnExprRector::class,
|
67 |
| - ReturnTypeFromStrictNativeFuncCallRector::class, |
68 | 46 | ReturnTypeFromStrictNewArrayRector::class,
|
69 | 47 | TypedPropertyFromAssignsRector::class,
|
70 |
| - VarConstantCommentRector::class |
71 | 48 | ]);
|
72 | 49 |
|
73 | 50 | // define sets of rules
|
|
0 commit comments