|
25 | 25 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector; |
26 | 26 | use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector; |
27 | 27 | use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; |
| 28 | +use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector; |
28 | 29 | use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; |
29 | 30 | use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; |
30 | 31 | use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; |
|
35 | 36 | use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; |
36 | 37 | use Rector\PHPUnit\CodeQuality\Rector\Class_\RemoveDataProviderParamKeysRector; |
37 | 38 | use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; |
| 39 | +use Rector\PHPUnit\CodeQuality\Rector\FuncCall\AssertFuncCallToPHPUnitAssertRector; |
| 40 | +use Rector\PHPUnit\CodeQuality\Rector\StmtsAwareInterface\DeclareStrictTypesTestsRector; |
| 41 | +use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector; |
38 | 42 | use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; |
39 | 43 | use Rector\Renaming\Rector\ConstFetch\RenameConstantRector; |
40 | 44 | use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector; |
41 | | -use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector; |
42 | 45 | use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector; |
43 | 46 | use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector; |
44 | 47 | use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector; |
|
53 | 56 |
|
54 | 57 | return RectorConfig::configure() |
55 | 58 | ->withPhpSets(php82: true) |
56 | | - ->withPreparedSets(deadCode: true, instanceOf: true, strictBooleans: true, phpunitCodeQuality: true) |
| 59 | + ->withPreparedSets(deadCode: true, instanceOf: true, phpunitCodeQuality: true) |
57 | 60 | ->withComposerBased(phpunit: true) |
58 | 61 | ->withParallel(120, 8, 10) |
59 | 62 | ->withCache( |
|
170 | 173 |
|
171 | 174 | // possibly isset() on purpose, on updated Config classes property accross versions |
172 | 175 | IssetOnPropertyObjectToPropertyExistsRector::class, |
| 176 | + |
| 177 | + AssertFuncCallToPHPUnitAssertRector::class => [ |
| 178 | + // use $this inside static closure |
| 179 | + __DIR__ . '/tests/system/AutoReview/FrameworkCodeTest.php', |
| 180 | + ], |
| 181 | + |
| 182 | + // some tests extended by other tests |
| 183 | + FinalizeTestCaseClassRector::class, |
| 184 | + |
| 185 | + DeclareStrictTypesTestsRector::class => [ |
| 186 | + __DIR__ . '/tests/system/Debug/ExceptionsTest.php', |
| 187 | + ], |
| 188 | + |
| 189 | + RemoveNullArgOnNullDefaultParamRector::class => [ |
| 190 | + // skip form query usage, easier to read |
| 191 | + __DIR__ . '/system/Model.php', |
| 192 | + __DIR__ . '/tests/system/Database', |
| 193 | + __DIR__ . '/tests/system/Models', |
| 194 | + ], |
173 | 195 | ]) |
174 | 196 | // auto import fully qualified class names |
175 | 197 | ->withImportNames(removeUnusedImports: true) |
|
190 | 212 | TernaryEmptyArrayArrayDimFetchToCoalesceRector::class, |
191 | 213 | DisallowedEmptyRuleFixerRector::class, |
192 | 214 | PrivatizeFinalClassPropertyRector::class, |
193 | | - BooleanInIfConditionRuleFixerRector::class, |
194 | 215 | VersionCompareFuncCallToConstantRector::class, |
195 | 216 | AddClosureVoidReturnTypeWhereNoReturnRector::class, |
196 | 217 | AddFunctionVoidReturnTypeWhereNoReturnRector::class, |
|
206 | 227 | ->withConfiguredRule(RenameConstantRector::class, [ |
207 | 228 | 'FILTER_DEFAULT' => 'FILTER_UNSAFE_RAW', |
208 | 229 | ]) |
209 | | - ->withCodeQualityLevel(54); |
| 230 | + ->withCodeQualityLevel(61); |
0 commit comments