-
-
Notifications
You must be signed in to change notification settings - Fork 436
/
.rector.php
62 lines (59 loc) · 2 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector as CodeQuality;
use Rector\DeadCode\Rector as DeadCode;
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector as TypeDeclaration;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/dev',
__DIR__ . '/errors',
__DIR__ . '/lib',
__DIR__ . '/pub',
__DIR__ . '/shell',
__DIR__ . '/tests',
])
->withSkipPath(__DIR__ . '/vendor')
->withSkip([
CodeQuality\BooleanNot\SimplifyDeMorganBinaryRector::class,
CodeQuality\If_\SimplifyIfReturnBoolRector::class,
__DIR__ . '/shell/translations.php',
__DIR__ . '/shell/update-copyright.php.php'
])
->withRules([
CodeQuality\BooleanNot\ReplaceMultipleBooleanNotRector::class,
CodeQuality\Foreach_\UnusedForeachValueToArrayKeysRector::class,
CodeQuality\FuncCall\ChangeArrayPushToArrayAssignRector::class,
CodeQuality\FuncCall\CompactToVariablesRector::class,
CodeQuality\FunctionLike\SimplifyUselessVariableRector::class,
CodeQuality\Identical\SimplifyArraySearchRector::class,
CodeQuality\Identical\SimplifyConditionsRector::class,
CodeQuality\Identical\StrlenZeroToIdenticalEmptyStringRector::class,
CodeQuality\NotEqual\CommonNotEqualRector::class,
CodeQuality\LogicalAnd\LogicalToBooleanRector::class,
CodeQuality\Ternary\SimplifyTautologyTernaryRector::class,
DeadCode\ClassMethod\RemoveUselessParamTagRector::class,
DeadCode\ClassMethod\RemoveUselessReturnTagRector::class,
DeadCode\Property\RemoveUselessVarTagRector::class,
TypeDeclaration\ClassMethod\ReturnNeverTypeRector::class,
])
->withPreparedSets(
false,
false,
false,
false,
true,
false,
false,
false,
false,
false,
false,
true,
false,
false,
false,
false,
true,
);