-
-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathrector.php
More file actions
64 lines (59 loc) · 3.16 KB
/
Copy pathrector.php
File metadata and controls
64 lines (59 loc) · 3.16 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
// phpcs:disable Generic.Arrays.DisallowLongArraySyntax
// rector process
return RectorConfig::configure()
->withParallel(120 * 2, 16, 16)
->withPhpVersion(PhpVersion::PHP_56)
->withPhpSets()
->withSets(
array(
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
)
)
->withPaths(
array(
__DIR__ . DIRECTORY_SEPARATOR . 'src',
)
)
->withSkip(
array(
Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class,
Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector::class,
Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector::class,
Rector\CodeQuality\Rector\FuncCall\InlineIsAInstanceOfRector::class,
Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector::class,
Rector\CodeQuality\Rector\Identical\BooleanNotIdenticalToNotIdenticalRector::class,
Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector::class,
Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector::class,
Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector::class,
Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector::class,
Rector\CodingStyle\Rector\String_\SimplifyQuoteEscapeRector::class,
Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector::class,
Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector::class,
Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector::class,
Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector::class,
Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector::class,
Rector\Php54\Rector\Array_\LongArrayToShortArrayRector::class,
Rector\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector::class,
Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector::class,
// PHP 5.6 incompatible
Rector\CodeQuality\Rector\Ternary\ArrayKeyExistsTernaryThenValueToCoalescingRector::class, // PHP 7
Rector\Php70\Rector\If_\IfToSpaceshipRector::class,
Rector\Php70\Rector\Ternary\TernaryToSpaceshipRector::class,
Rector\Php71\Rector\BooleanOr\IsIterableRector::class,
Rector\Php71\Rector\List_\ListToArrayDestructRector::class,
Rector\Php71\Rector\TryCatch\MultiExceptionCatchRector::class,
Rector\Php73\Rector\FuncCall\ArrayKeyFirstLastRector::class,
Rector\Php73\Rector\BooleanOr\IsCountableRector::class,
Rector\Php74\Rector\Assign\NullCoalescingOperatorRector::class,
Rector\Php74\Rector\StaticCall\ExportToReflectionFunctionRector::class,
Rector\CodingStyle\Rector\ClassLike\NewlineBetweenClassLikeStmtsRector::class,
Rector\CodingStyle\Rector\ClassConst\RemoveFinalFromConstRector::class, // PHP 8
)
);