|
2 | 2 |
|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
| 5 | +/** |
| 6 | + * This file is part of CodeIgniter Queue. |
| 7 | + * |
| 8 | + * (c) CodeIgniter Foundation <admin@codeigniter.com> |
| 9 | + * |
| 10 | + * For the full copyright and license information, please view |
| 11 | + * the LICENSE file that was distributed with this source code. |
| 12 | + */ |
| 13 | + |
5 | 14 | use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector; |
6 | 15 | use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; |
7 | 16 | use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; |
8 | 17 | use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector; |
9 | | -use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector; |
10 | 18 | use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector; |
11 | | -use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector; |
12 | 19 | use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector; |
13 | 20 | use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; |
14 | | -use Rector\CodeQuality\Rector\If_\CombineIfRector; |
15 | | -use Rector\CodeQuality\Rector\If_\ShortenElseIfRector; |
16 | | -use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector; |
17 | 21 | use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector; |
18 | 22 | use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector; |
19 | 23 | use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector; |
20 | 24 | use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector; |
21 | 25 | use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector; |
22 | | -use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; |
23 | 26 | use Rector\Config\RectorConfig; |
24 | 27 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
25 | 28 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; |
26 | | -use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
27 | 29 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
28 | 30 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
29 | 31 | use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector; |
30 | 32 | use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; |
31 | 33 | use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; |
32 | | -use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector; |
33 | | -use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector; |
34 | 34 | use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
35 | 35 | use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertEmptyNullableObjectToAssertInstanceofRector; |
36 | 36 | use Rector\PHPUnit\Set\PHPUnitSetList; |
37 | 37 | use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; |
38 | 38 | use Rector\Set\ValueObject\LevelSetList; |
39 | 39 | use Rector\Set\ValueObject\SetList; |
40 | | -use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector; |
41 | 40 | use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector; |
42 | 41 | use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; |
43 | 42 | use Rector\ValueObject\PhpVersion; |
|
47 | 46 | SetList::DEAD_CODE, |
48 | 47 | LevelSetList::UP_TO_PHP_82, |
49 | 48 | PHPUnitSetList::PHPUNIT_CODE_QUALITY, |
50 | | - PHPUnitSetList::PHPUNIT_100, |
51 | 49 | ]); |
52 | 50 |
|
53 | 51 | $rectorConfig->parallel(); |
|
88 | 86 |
|
89 | 87 | // Note: requires php 8 |
90 | 88 | RemoveUnusedPromotedPropertyRector::class, |
91 | | - AnnotationWithValueToAttributeRector::class, |
92 | 89 |
|
93 | 90 | // May load view files directly when detecting classes |
94 | 91 | StringClassNameToClassConstantRector::class, |
95 | 92 |
|
96 | | - // Supported from PHPUnit 10 |
97 | | - DataProviderAnnotationToAttributeRector::class, |
98 | | - |
99 | 93 | AssertEmptyNullableObjectToAssertInstanceofRector::class, |
100 | 94 |
|
101 | 95 | // Skip onInterruption method - called dynamically via reflection in SignalTrait |
|
109 | 103 |
|
110 | 104 | $rectorConfig->rule(SimplifyUselessVariableRector::class); |
111 | 105 | $rectorConfig->rule(RemoveAlwaysElseRector::class); |
112 | | - $rectorConfig->rule(CountArrayToEmptyArrayComparisonRector::class); |
113 | | - $rectorConfig->rule(ChangeNestedForeachIfsToEarlyContinueRector::class); |
114 | 106 | $rectorConfig->rule(ChangeIfElseValueAssignToEarlyReturnRector::class); |
115 | 107 | $rectorConfig->rule(SimplifyStrposLowerRector::class); |
116 | | - $rectorConfig->rule(CombineIfRector::class); |
117 | 108 | $rectorConfig->rule(SimplifyIfReturnBoolRector::class); |
118 | 109 | $rectorConfig->rule(InlineIfToExplicitIfRector::class); |
119 | 110 | $rectorConfig->rule(PreparedValueToEarlyReturnRector::class); |
120 | | - $rectorConfig->rule(ShortenElseIfRector::class); |
121 | | - $rectorConfig->rule(SimplifyIfElseToTernaryRector::class); |
122 | | - $rectorConfig->rule(UnusedForeachValueToArrayKeysRector::class); |
123 | 111 | $rectorConfig->rule(ChangeArrayPushToArrayAssignRector::class); |
124 | 112 | $rectorConfig->rule(UnnecessaryTernaryExpressionRector::class); |
125 | | - $rectorConfig->rule(SimplifyRegexPatternRector::class); |
126 | 113 | $rectorConfig->rule(FuncGetArgsToVariadicParamRector::class); |
127 | 114 | $rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class); |
128 | 115 | $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); |
129 | 116 | $rectorConfig->rule(SimplifyEmptyCheckOnEmptyArrayRector::class); |
130 | 117 | $rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class); |
131 | 118 | $rectorConfig->rule(EmptyOnNullableObjectToInstanceOfRector::class); |
132 | | - $rectorConfig->rule(DisallowedEmptyRuleFixerRector::class); |
133 | 119 | $rectorConfig |
134 | 120 | ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ |
135 | 121 | /** |
|
0 commit comments