-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathrector.php
55 lines (52 loc) · 2.07 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php80\Rector\Class_\StringableForToStringRector;
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\BooleanAnd\BinaryOpNullableToInstanceofRector;
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/src',
])
->withImportNames()
->withRules([
])
->withSkip([
BinaryOpNullableToInstanceofRector::class,
ChangeArrayPushToArrayAssignRector::class,
ClosureToArrowFunctionRector::class,
DisallowedEmptyRuleFixerRector::class,
EmptyOnNullableObjectToInstanceOfRector::class,
ExplicitBoolCompareRector::class,
FinalizeClassesWithoutChildrenRector::class,
InlineIfToExplicitIfRector::class,
NewInInitializerRector::class,
RemoveNonExistingVarAnnotationRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
SimplifyIfElseToTernaryRector::class,
StringableForToStringRector::class,
])
->withSets([
LevelSetList::UP_TO_PHP_82,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::INSTANCEOF,
SetList::PHP_82,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
])
;