mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
chore: use new rector syntax
This commit is contained in:
committed by
GitHub
parent
9ceb0834ae
commit
88197fe1d5
36
rector.php
36
rector.php
@ -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();
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user