-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
executable file
·42 lines (36 loc) · 1.04 KB
/
rector.php
File metadata and controls
executable file
·42 lines (36 loc) · 1.04 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/routes',
])
->withSkip([
__DIR__ . '/vendor',
__DIR__ . '/storage',
])
->withSets([
// Core language modernization to PHP 8.4
LevelSetList::UP_TO_PHP_84,
// Aggressive quality improvements for modern application code
SetList::CODE_QUALITY,
SetList::TYPE_DECLARATION,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
// Coding standards and imports
SetList::CODING_STYLE,
// More opinionated improvements for application code
SetList::PRIVATIZATION,
SetList::NAMING,
SetList::INSTANCEOF,
])
->withImportNames(
importShortClasses: true,
removeUnusedImports: true
)
->withParallel()
->withCache(__DIR__ . '/var/cache/rector')
->withPhpSets(php84: true);