-
-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathrector.php
60 lines (58 loc) · 2.48 KB
/
rector.php
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector;
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector;
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
return RectorConfig::configure()
->withParallel(240, 8)
->withPaths([
__DIR__ . '/lam/help',
__DIR__ . '/lam/lib',
__DIR__ . '/lam/templates',
__DIR__ . '/lam/tests',
])
->withSets([
SetList::DEAD_CODE,
LevelSetList::UP_TO_PHP_81,
SetList::CODE_QUALITY,
])
->withSkip([
__DIR__ . '/lam/lib/3rdParty',
NullToStrictStringFuncCallArgRector::class,
ReadOnlyPropertyRector::class,
ClassPropertyAssignToConstructorPromotionRector::class,
StaticCallOnNonStaticToInstanceCallRector::class,
StringifyStrNeedlesRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
ForRepeatedCountToOwnVariableRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
DisallowedEmptyRuleFixerRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
InlineArrayReturnAssignRector::class,
// TODO private method check is unreliable, recheck with newer rector version
RemoveUnusedPrivateMethodRector::class,
// TODO parent call check is unreliable, recheck with newer rector version
RemoveParentCallWithoutParentRector::class,
// TODO inherited properties check is unreliable, recheck with newer rector version
CompleteDynamicPropertiesRector::class,
// TODO unreliable, recheck with newer rector version
ExplicitReturnNullRector::class
])
->withFileExtensions([
'php',
'inc'
]);