Skip to content

Commit

Permalink
Simplify rector configuration (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik authored Jan 23, 2025
1 parent a59c69e commit 11ccd33
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,18 @@
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
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_81,
]);

$rectorConfig->skip([
])
->withPhpSets(php81: true)
->withRules([
InlineConstructorDefaultToPropertyRector::class,
])
->withSkip([
ClosureToArrowFunctionRector::class,
ReadOnlyPropertyRector::class,
NullToStrictStringFuncCallArgRector::class,
]);
};

0 comments on commit 11ccd33

Please sign in to comment.