-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
65 lines (59 loc) · 3.55 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
61
62
63
64
65
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->sets([
SetList::PHP_52,
SetList::PHP_53,
SetList::PHP_54,
SetList::PHP_55,
SetList::PHP_56,
SetList::PHP_71,
SetList::PHP_72,
SetList::PHP_73,
SetList::PHP_74,
SetList::PHP_80,
SetList::PHP_81,
SetList::PHP_82,
SetList::CODE_QUALITY,
]);
$rectorConfig->rule(\Rector\Php82\Rector\Class_\ReadOnlyClassRector::class);
$rectorConfig->rule(\Rector\Strict\Rector\Ternary\BooleanInTernaryOperatorRuleFixerRector::class);
$rectorConfig->rule(\Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector::class);
$rectorConfig->rule(\Rector\Strict\Rector\Ternary\DisallowedShortTernaryRuleFixerRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\CallUserFuncArrayToVariadicRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\CallUserFuncToMethodCallRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\ConsistentImplodeRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\If_\NullableCompareToNullRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\If_\NullableCompareToNullRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\Use_\SeparateMultiUseImportsRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\ClassConst\SplitGroupedClassConstantsRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\Property\SplitGroupedPropertiesRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\Closure\StaticClosureRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\StrictArraySearchRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\FuncCall\StrictArraySearchRector::class);
$rectorConfig->rule(\Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\Cast\RecastingRemovalRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\BooleanAnd\RemoveAndTrueRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\BooleanAnd\RemoveAndTrueRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\StmtsAwareInterface\RemoveJustPropertyFetchForAssignRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector::class);
$rectorConfig->rule(\Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector::class);
// no needed rules
$rectorConfig->skip([
\Rector\Php73\Rector\String_\SensitiveHereNowDocRector::class,
\Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector::class,
\Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector::class,
\Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector::class,
]);
};