|
| 1 | +<?php |
| 2 | + |
| 3 | +/** @noinspection UsingInclusionReturnValueInspection */ |
| 4 | + |
| 5 | +declare(strict_types=1); |
| 6 | + |
| 7 | +use Rector\CodeQuality\Rector\BooleanOr\RepeatedOrEqualToInArrayRector; |
| 8 | +use Rector\CodeQuality\Rector\ClassConstFetch\VariableConstFetchToClassConstFetchRector; |
| 9 | +use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector; |
| 10 | +use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector; |
| 11 | +use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; |
| 12 | +use Rector\CodeQuality\Rector\Ternary\SwitchNegatedTernaryRector; |
| 13 | +use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector; |
| 14 | +use Rector\CodingStyle\Rector\ClassLike\NewlineBetweenClassLikeStmtsRector; |
| 15 | +use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector; |
| 16 | +use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; |
| 17 | +use Rector\CodingStyle\Rector\String_\SimplifyQuoteEscapeRector; |
| 18 | +use Rector\Config\RectorConfig; |
| 19 | +use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector; |
| 20 | +use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector; |
| 21 | +use Rector\EarlyReturn\Rector\StmtsAwareInterface\ReturnEarlyIfVariableRector; |
| 22 | +use Rector\Naming\Rector\Assign\RenameVariableToMatchMethodCallReturnTypeRector; |
| 23 | +use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector; |
| 24 | +use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector; |
| 25 | +use Rector\Naming\Rector\ClassMethod\RenameVariableToMatchNewTypeRector; |
| 26 | +use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchExprVariableRector; |
| 27 | +use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector; |
| 28 | +use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; |
| 29 | +use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector; |
| 30 | +use Rector\TypeDeclaration\Rector\Class_\TypedPropertyFromCreateMockAssignRector; |
| 31 | + |
| 32 | +$config = RectorConfig::configure(); |
| 33 | + |
| 34 | +$config->withPreparedSets( |
| 35 | + true, |
| 36 | + true, |
| 37 | + true, |
| 38 | + true, |
| 39 | + true, |
| 40 | + true, |
| 41 | + true, |
| 42 | + true, |
| 43 | + true, |
| 44 | + false, |
| 45 | + true, |
| 46 | + true, |
| 47 | + true, |
| 48 | +); |
| 49 | + |
| 50 | +$config |
| 51 | + ->withPaths( |
| 52 | + [ |
| 53 | + './src', |
| 54 | + './test/phpunit', |
| 55 | + // './.php-cs-fixer.dist.php', |
| 56 | + './rector.php', |
| 57 | + ] |
| 58 | + ) |
| 59 | + ->withSkip( |
| 60 | + [ |
| 61 | + // Control |
| 62 | + DisallowedEmptyRuleFixerRector::class, |
| 63 | + FlipTypeControlToUseExclusiveTypeRector::class, |
| 64 | + |
| 65 | + // New lines |
| 66 | + NewlineAfterStatementRector::class, |
| 67 | + NewlineBeforeNewAssignSetRector::class, |
| 68 | + NewlineBetweenClassLikeStmtsRector::class, |
| 69 | + |
| 70 | + // Naming |
| 71 | + RenamePropertyToMatchTypeRector::class, |
| 72 | + RenameParamToMatchTypeRector::class, |
| 73 | + RenameVariableToMatchNewTypeRector::class, |
| 74 | + RenameVariableToMatchMethodCallReturnTypeRector::class, |
| 75 | + |
| 76 | + // PHPUnit |
| 77 | + PreferPHPUnitThisCallRector::class, |
| 78 | + ] |
| 79 | + ) |
| 80 | +; |
| 81 | + |
| 82 | +return $config; |
0 commit comments