| 1 |
<?php |
| 2 |
|
| 3 |
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; |
| 4 |
use Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector; |
| 5 |
use Rector\CodeQuality\Rector\If_\CombineIfRector; |
| 6 |
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector; |
| 7 |
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector; |
| 8 |
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector; |
| 9 |
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; |
| 10 |
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; |
| 11 |
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector; |
| 12 |
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; |
| 13 |
use Rector\Config\RectorConfig; |
| 14 |
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector; |
| 15 |
use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector; |
| 16 |
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector; |
| 17 |
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; |
| 18 |
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector; |
| 19 |
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; |
| 20 |
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector; |
| 21 |
use Rector\ValueObject\PhpVersion; |
| 22 |
|
| 23 |
return RectorConfig::configure() |
| 24 |
->withSkipPath(__DIR__ . '/tests/Fixtures') |
| 25 |
->withSkip([ |
| 26 |
NewlineBeforeNewAssignSetRector::class, |
| 27 |
CombineIfRector::class, |
| 28 |
ExplicitBoolCompareRector::class, |
| 29 |
ForRepeatedCountToOwnVariableRector::class, |
| 30 |
ReadOnlyPropertyRector::class, |
| 31 |
RemoveAlwaysTrueIfConditionRector::class => [ |
| 32 |
__DIR__ . '/src/Processors/ExpandEnums.php', |
| 33 |
], |
| 34 |
RemoveDeadInstanceOfRector::class => [ |
| 35 |
__DIR__ . '/src/Processors/ExpandEnums.php', |
| 36 |
], |
| 37 |
ShortenElseIfRector::class, |
| 38 |
NewlineAfterStatementRector::class, |
| 39 |
NullableCompareToNullRector::class, |
| 40 |
StringClassNameToClassConstantRector::class => [ |
| 41 |
__DIR__ . '/src/Analysers/DocBlockParser.php', |
| 42 |
__DIR__ . '/src/Analysers/TypeResolverTrait.php', |
| 43 |
__DIR__ . '/tests/Analysers/ComposerAutoloaderScannerTest.php', |
| 44 |
__DIR__ . '/tests/Analysers/TokenScannerTest.php', |
| 45 |
__DIR__ . '/tests/AnalysisTest.php', |
| 46 |
__DIR__ . '/tests/ContextTest.php', |
| 47 |
], |
| 48 |
WrapEncapsedVariableInCurlyBracesRector::class => [ |
| 49 |
__DIR__ . '/src/Type/LegacyTypeResolver.php', |
| 50 |
], |
| 51 |
EncapsedStringsToSprintfRector::class, |
| 52 |
ParamTypeByMethodCallTypeRector::class => [ |
| 53 |
__DIR__ . '/src/Serializer.php', |
| 54 |
], |
| 55 |
ClassPropertyAssignToConstructorPromotionRector::class, |
| 56 |
CompleteDynamicPropertiesRector::class => [ |
| 57 |
__DIR__ . '/src/Annotations/AbstractAnnotation.php', |
| 58 |
], |
| 59 |
ArrayToFirstClassCallableRector::class => [ |
| 60 |
__DIR__ . '/tests/Analysers/ComposerAutoloaderScannerTest.php', |
| 61 |
], |
| 62 |
]) |
| 63 |
->withPreparedSets( |
| 64 |
deadCode: true, |
| 65 |
codeQuality: true, |
| 66 |
codingStyle: true, |
| 67 |
typeDeclarations: true, |
| 68 |
phpunitCodeQuality: true, |
| 69 |
) |
| 70 |
->withAttributesSets(phpunit: true) |
| 71 |
->withPhpVersion(PhpVersion::PHP_82) |
| 72 |
->withPhpSets(); |