Merge pull request #1209 from phh/patch-1

chore: Use new rector syntax
This commit is contained in:
Nuno Maduro
2024-09-03 12:15:43 +01:00
committed by GitHub

View File

@ -2,30 +2,20 @@
declare(strict_types=1); declare(strict_types=1);
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',
]); ])
->withSkip([
$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
]);
$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();
]);
};