mirror of
https://github.com/yiisoft/app.git
synced 2026-02-20 01:21:20 +01:00
Update rector configuration (#385)
This commit is contained in:
committed by
GitHub
parent
9de31b4724
commit
a859ed0d07
23
rector.php
23
rector.php
@@ -6,24 +6,17 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
|
||||
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
|
||||
use Rector\Set\ValueObject\LevelSetList;
|
||||
|
||||
return static function (RectorConfig $rectorConfig): void {
|
||||
$rectorConfig->paths([
|
||||
return RectorConfig::configure()
|
||||
->withPaths([
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/tests',
|
||||
]);
|
||||
|
||||
// register a single rule
|
||||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
||||
|
||||
// define sets of rules
|
||||
$rectorConfig->sets([
|
||||
LevelSetList::UP_TO_PHP_82,
|
||||
]);
|
||||
|
||||
$rectorConfig->skip([
|
||||
])
|
||||
->withPhpSets(php82: true)
|
||||
->withRules([
|
||||
InlineConstructorDefaultToPropertyRector::class,
|
||||
])
|
||||
->withSkip([
|
||||
ClosureToArrowFunctionRector::class,
|
||||
ReadOnlyPropertyRector::class,
|
||||
]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user