2022-07-05 16:18:20 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
|
|
|
use Rector\Config\RectorConfig;
|
|
|
|
use Rector\Set\ValueObject\LevelSetList;
|
|
|
|
use Rector\Set\ValueObject\SetList;
|
|
|
|
|
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
|
|
$rectorConfig->paths([
|
2022-07-05 16:32:18 +02:00
|
|
|
__DIR__.'/src',
|
2022-07-05 16:18:20 +02:00
|
|
|
]);
|
|
|
|
|
|
|
|
// register a single rule
|
|
|
|
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
|
|
|
|
|
|
|
// define sets of rules
|
2022-07-05 16:32:18 +02:00
|
|
|
$rectorConfig->sets([
|
|
|
|
LevelSetList::UP_TO_PHP_81,
|
|
|
|
SetList::CODE_QUALITY,
|
|
|
|
SetList::DEAD_CODE,
|
|
|
|
]);
|
2022-07-05 16:18:20 +02:00
|
|
|
};
|