Created
July 1, 2024 10:03
-
-
Save sander3/345a808a2735a586f8dac6e0dce21ecb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | |
use Rector\Config\RectorConfig; | |
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; | |
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; | |
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; | |
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DataProviderAnnotationToAttributeRector; | |
use Rector\PHPUnit\AnnotationsToAttributes\Rector\ClassMethod\DependsAnnotationWithValueToAttributeRector; | |
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\DataProviderArrayItemsNewLinedRector; | |
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\RemoveEmptyTestMethodRector; | |
use Rector\PHPUnit\CodeQuality\Rector\ClassMethod\ReplaceTestAnnotationWithPrefixedFunctionRector; | |
use Rector\PHPUnit\CodeQuality\Rector\Foreach_\SimplifyForeachInstanceOfRector; | |
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertInstanceOfComparisonRector; | |
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertNotOperatorRector; | |
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertSameBoolNullToSpecificMethodRector; | |
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertSameTrueFalseToAssertTrueFalseRector; | |
use Rector\PHPUnit\PHPUnit100\Rector\Class_\PublicDataProviderClassMethodRector; | |
use Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector; | |
use Rector\PHPUnit\PHPUnit60\Rector\ClassMethod\ExceptionAnnotationRector; | |
use Rector\PHPUnit\PHPUnit70\Rector\Class_\RemoveDataProviderTestPrefixRector; | |
use Rector\PHPUnit\PHPUnit80\Rector\MethodCall\SpecificAssertContainsRector; | |
use Rector\Set\ValueObject\SetList; | |
use RectorLaravel\Set\LaravelSetList; | |
return static function (RectorConfig $rectorConfig): void { | |
$rectorConfig->parallel(processTimeout: 180, maxNumberOfProcess: 8, jobSize: 10); | |
$rectorConfig->paths([ | |
__DIR__ . '/app', | |
__DIR__ . '/bootstrap', | |
__DIR__ . '/config', | |
__DIR__ . '/routes', | |
__DIR__ . '/src', | |
__DIR__ . '/tests', | |
]); | |
$rectorConfig->rules([ | |
AssertInstanceOfComparisonRector::class, | |
AssertNotOperatorRector::class, | |
AssertSameBoolNullToSpecificMethodRector::class, | |
AssertSameTrueFalseToAssertTrueFalseRector::class, | |
DataProviderAnnotationToAttributeRector::class, | |
DataProviderArrayItemsNewLinedRector::class, | |
DependsAnnotationWithValueToAttributeRector::class, | |
ExceptionAnnotationRector::class, | |
InlineConstructorDefaultToPropertyRector::class, | |
PublicDataProviderClassMethodRector::class, | |
RemoveDataProviderTestPrefixRector::class, | |
RemoveEmptyTestMethodRector::class, | |
ReplaceTestAnnotationWithPrefixedFunctionRector::class, | |
SimplifyForeachInstanceOfRector::class, | |
SpecificAssertContainsRector::class, | |
StaticDataProviderClassMethodRector::class, | |
]); | |
$rectorConfig->sets([ | |
LaravelSetList::LARAVEL_100, | |
LaravelSetList::LARAVEL_110, | |
LaravelSetList::LARAVEL_60, | |
LaravelSetList::LARAVEL_70, | |
LaravelSetList::LARAVEL_80, | |
LaravelSetList::LARAVEL_90, | |
SetList::PHP_80, | |
SetList::PHP_81, | |
SetList::PHP_82, | |
SetList::PHP_83, | |
]); | |
$rectorConfig->skip([ | |
__DIR__ . '/app/Model/Base', | |
NullToStrictStringFuncCallArgRector::class, | |
ReadOnlyPropertyRector::class, | |
RemoveParentCallWithoutParentRector::class, | |
]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment