|
3 | 3 | use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; |
4 | 4 | use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector; |
5 | 5 | use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector; |
6 | | -use Rector\CodeQuality\Rector\For_\ForToForeachRector; |
7 | 6 | use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector; |
8 | | -use Rector\CodeQuality\Rector\FuncCall\AddPregQuoteDelimiterRector; |
9 | 7 | use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector; |
10 | 8 | use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector; |
11 | 9 | use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector; |
|
21 | 19 | use Rector\Config\RectorConfig; |
22 | 20 | use Rector\Core\ValueObject\PhpVersion; |
23 | 21 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; |
24 | | -use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector; |
25 | 22 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
26 | 23 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
27 | 24 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
|
31 | 28 | use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; |
32 | 29 | use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; |
33 | 30 | use Rector\PHPUnit\Set\PHPUnitSetList; |
34 | | -use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector; |
35 | 31 | use Rector\Set\ValueObject\LevelSetList; |
36 | 32 | use Rector\Set\ValueObject\SetList; |
37 | 33 |
|
|
74 | 70 | // Note: requires php 8 |
75 | 71 | RemoveUnusedPromotedPropertyRector::class, |
76 | 72 |
|
77 | | - // Ignore tests that might make calls without a result |
78 | | - RemoveEmptyMethodCallRector::class => [ |
79 | | - __DIR__ . '/tests', |
80 | | - ], |
81 | | - |
82 | | - // Ignore files that should not be namespaced |
83 | | - NormalizeNamespaceByPSR4ComposerAutoloadRector::class => [ |
84 | | - __DIR__ . '/src/Helpers', |
85 | | - __DIR__ . '/tests/_support', |
86 | | - ], |
87 | | - |
88 | 73 | // May load view files directly when detecting classes |
89 | 74 | StringClassNameToClassConstantRector::class, |
90 | 75 |
|
|
94 | 79 | $rectorConfig->rule(SimplifyUselessVariableRector::class); |
95 | 80 | $rectorConfig->rule(RemoveAlwaysElseRector::class); |
96 | 81 | $rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class); |
97 | | - $rectorConfig->rule(ForToForeachRector::class); |
98 | 82 | $rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class); |
99 | 83 | $rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class); |
100 | 84 | $rectorConfig->rule(SimplifyStrposLowerRector::class); |
|
107 | 91 | $rectorConfig->rule(UnusedForeachValueToArrayKeysRector::class); |
108 | 92 | $rectorConfig->rule(ChangeArrayPushToArrayAssignRector::class); |
109 | 93 | $rectorConfig->rule(UnnecessaryTernaryExpressionRector::class); |
110 | | - $rectorConfig->rule(AddPregQuoteDelimiterRector::class); |
111 | 94 | $rectorConfig->rule(SimplifyRegexPatternRector::class); |
112 | 95 | $rectorConfig->rule(FuncGetArgsToVariadicParamRector::class); |
113 | 96 | $rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class); |
114 | 97 | $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); |
115 | | - $rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class); |
116 | 98 | $rectorConfig |
117 | 99 | ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ |
118 | 100 | // Set to false if you use in libraries, or it does create breaking changes. |
|
0 commit comments