-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrector.php
More file actions
25 lines (20 loc) · 856 Bytes
/
rector.php
File metadata and controls
25 lines (20 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use RectorLaravel\Set\LaravelSetList;
return static function (RectorConfig $rectorConfig): void {
// here we can define, what sets of rules will be applied
// tip: use "SetList" class to autocomplete sets
$rectorConfig->sets([
// SetList::CODE_QUALITY,
LaravelSetList::LARAVEL_100,
LaravelSetList::LARAVEL_CODE_QUALITY,
]);
// paths to refactor; solid alternative to CLI arguments
$rectorConfig->paths([__DIR__.'/src', __DIR__.'/tests']);
// is your PHP version different from the one you refactor to? [default: your PHP version], uses PHP_VERSION_ID format
$rectorConfig->phpVersion(PhpVersion::PHP_81);
// register single rule
// $rectorConfig->rule(TypedPropertyRector::class);
};