chore: use new rector syntax

This commit is contained in:
Patrick Hesselberg
2024-08-28 08:22:18 +02:00
committed by GitHub
parent 9ceb0834ae
commit 88197fe1d5

View File

@ -4,28 +4,22 @@ declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\Config\RectorConfig; use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void { return RectorConfig::configure()
$rectorConfig->paths([ ->withPaths([
__DIR__.'/src', __DIR__.'/src',
]); ])
->withRules([
$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class, InlineConstructorDefaultToPropertyRector::class,
]); ])
->withSkip([
$rectorConfig->skip([
__DIR__.'/src/Plugins/Parallel/Paratest/WrapperRunner.php', __DIR__.'/src/Plugins/Parallel/Paratest/WrapperRunner.php',
]); ])
->withPreparedSets(
$rectorConfig->sets([ deadCode: true,
LevelSetList::UP_TO_PHP_81, codeQuality: true,
SetList::CODE_QUALITY, typeDeclarations: true,
SetList::DEAD_CODE, privatization: true,
SetList::EARLY_RETURN, earlyReturn: true,
SetList::TYPE_DECLARATION, )
SetList::PRIVATIZATION, ->withPhpSets();
]);
};