phpvms/rector.php
Arthur Parienté 28e2d33b88
[8.x] Add RectorPHP (#1986)
* Add rector

* Remove cache

* Run rector again

* Run pint

* Run Rector in CI

* Update composer.lock
2025-03-14 11:38:16 -05:00

34 lines
835 B
PHP

<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
use RectorLaravel\Set\LaravelLevelSetList;
return static function (RectorConfig $rectorConfig): void {
// Paths to analyze
$rectorConfig->paths([
__DIR__.'/app',
__DIR__.'/config',
__DIR__.'/resources',
__DIR__.'/tests',
]);
// Skip specific rules
$rectorConfig->skip([
CompactToVariablesRector::class,
]);
// Apply sets for Laravel and general code quality
$rectorConfig->sets([
LaravelLevelSetList::UP_TO_LARAVEL_110,
SetList::CODE_QUALITY,
]);
// Define PHP version for Rector
$rectorConfig->phpVersion(PhpVersion::PHP_84);
};