-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Expand file tree
/
Copy pathrector.php
More file actions
95 lines (92 loc) · 4.31 KB
/
rector.php
File metadata and controls
95 lines (92 loc) · 4.31 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector;
use Rector\CodingStyle\Rector\Closure\ClosureDelegatingCallToFirstClassCallableRector;
use Rector\CodingStyle\Rector\FuncCall\ClosureFromCallableToFirstClassCallableRector;
use Rector\CodingStyle\Rector\FuncCall\ConsistentImplodeRector;
use Rector\CodingStyle\Rector\FuncCall\FunctionFirstClassCallableRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\Class_\ClassConstantToSelfClassRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php56\Rector\FuncCall\PowToExpRector;
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php70\Rector\If_\IfToSpaceshipRector;
use Rector\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector;
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector;
use Rector\Php70\Rector\Ternary\TernaryToNullCoalescingRector;
use Rector\Php71\Rector\BinaryOp\BinaryOpBetweenNumberAndStringRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Php74\Rector\Assign\NullCoalescingOperatorRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php80\Rector\Catch_\RemoveUnusedVariableInCatchRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php80\Rector\Class_\StringableForToStringRector;
use Rector\Php80\Rector\ClassConstFetch\ClassOnThisVariableObjectRector;
use Rector\Php80\Rector\FuncCall\ClassOnObjectRector;
use Rector\Php80\Rector\Switch_\ChangeSwitchToMatchRector;
use Rector\Php80\Rector\Ternary\GetDebugTypeRector;
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php82\Rector\Class_\ReadOnlyClassRector;
use Rector\Php83\Rector\ClassConst\AddTypeToConstRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Php83\Rector\FuncCall\DynamicClassConstFetchRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
return RectorConfig::configure()
->withRootFiles()
->withPaths([
__DIR__.'/config',
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/types',
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
AddTypeToConstRector::class,
ArrayToFirstClassCallableRector::class,
ArrowFunctionDelegatingCallToFirstClassCallableRector::class,
BinaryOpBetweenNumberAndStringRector::class,
ChangeSwitchToMatchRector::class,
ClassConstantToSelfClassRector::class,
ClassOnObjectRector::class,
ClassOnThisVariableObjectRector::class,
ClassPropertyAssignToConstructorPromotionRector::class,
ClosureDelegatingCallToFirstClassCallableRector::class,
ClosureFromCallableToFirstClassCallableRector::class,
ClosureToArrowFunctionRector::class,
ConsistentImplodeRector::class,
DynamicClassConstFetchRector::class,
FunctionFirstClassCallableRector::class,
GetDebugTypeRector::class,
IfIssetToCoalescingRector::class,
IfToSpaceshipRector::class,
NullCoalescingOperatorRector::class,
NullToStrictStringFuncCallArgRector::class,
PowToExpRector::class,
RandomFunctionRector::class,
ReadOnlyClassRector::class,
ReadOnlyPropertyRector::class,
RemoveExtraParametersRector::class,
RemoveUnusedVariableInCatchRector::class,
ReturnNeverTypeRector::class,
StaticCallOnNonStaticToInstanceCallRector::class,
StringClassNameToClassConstantRector::class,
StringableForToStringRector::class,
TernaryToNullCoalescingRector::class,
ThisCallOnStaticMethodToStaticCallRector::class,
'tests/Foundation/fixtures/bad-syntax-strategy.php',
])
->withPreparedSets(
deadCode: false,
codeQuality: false,
codingStyle: false,
typeDeclarations: false,
typeDeclarationDocblocks: false,
privatization: false,
naming: false,
instanceOf: false,
earlyReturn: false,
)
->withPhpSets(php83: true);