forked from rectorphp/rector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coding-style.php
80 lines (74 loc) · 4.48 KB
/
coding-style.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Assign\ManualJsonStringToJsonEncodeArrayRector;
use Rector\CodingStyle\Rector\Assign\PHPStormVarAnnotationRector;
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector;
use Rector\CodingStyle\Rector\ClassConst\SplitGroupedConstantsAndPropertiesRector;
use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\CodingStyle\Rector\ClassMethod\RemoveDoubleUnderscoreInMethodNameRector;
use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\CodingStyle\Rector\FuncCall\CallUserFuncCallToVariadicRector;
use Rector\CodingStyle\Rector\FuncCall\ConsistentImplodeRector;
use Rector\CodingStyle\Rector\FuncCall\ConsistentPregDelimiterRector;
use Rector\CodingStyle\Rector\FuncCall\VersionCompareFuncCallToConstantRector;
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
use Rector\CodingStyle\Rector\Include_\FollowRequireByDirRector;
use Rector\CodingStyle\Rector\MethodCall\UseMessageVariableForSprintfInSymfonyStyleRector;
use Rector\CodingStyle\Rector\Plus\UseIncrementAssignRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\CodingStyle\Rector\Property\AddFalseDefaultToBoolPropertyRector;
use Rector\CodingStyle\Rector\String_\SplitStringClassConstantToClassConstFetchRector;
use Rector\CodingStyle\Rector\String_\SymplifyQuoteEscapeRector;
use Rector\CodingStyle\Rector\Switch_\BinarySwitchToIfElseRector;
use Rector\CodingStyle\Rector\Ternary\TernaryConditionVariableAssignmentRector;
use Rector\CodingStyle\Rector\Use_\RemoveUnusedAliasRector;
use Rector\CodingStyle\Rector\Use_\SplitGroupedUseImportsRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Transform\Rector\FuncCall\FuncCallToConstFetchRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(PHPStormVarAnnotationRector::class);
$services->set(NullableCompareToNullRector::class);
$services->set(BinarySwitchToIfElseRector::class);
$services->set(ConsistentImplodeRector::class);
$services->set(TernaryConditionVariableAssignmentRector::class);
$services->set(RemoveUnusedAliasRector::class);
$services->set(SymplifyQuoteEscapeRector::class);
$services->set(SplitGroupedConstantsAndPropertiesRector::class);
$services->set(SplitStringClassConstantToClassConstFetchRector::class);
$services->set(StringClassNameToClassConstantRector::class);
$services->set(ConsistentPregDelimiterRector::class);
$services->set(FollowRequireByDirRector::class);
$services->set(CatchExceptionNameMatchingTypeRector::class);
$services->set(UseIncrementAssignRector::class);
$services->set(SplitDoubleAssignRector::class);
$services->set(VarConstantCommentRector::class);
$services->set(EncapsedStringsToSprintfRector::class);
$services->set(WrapEncapsedVariableInCurlyBracesRector::class);
$services->set(NewlineBeforeNewAssignSetRector::class);
$services->set(ManualJsonStringToJsonEncodeArrayRector::class);
$services->set(AddArrayDefaultToArrayPropertyRector::class);
$services->set(AddFalseDefaultToBoolPropertyRector::class);
$services->set(MakeInheritedMethodVisibilitySameAsParentRector::class);
$services->set(CallUserFuncCallToVariadicRector::class);
$services->set(VersionCompareFuncCallToConstantRector::class);
$services->set(UseMessageVariableForSprintfInSymfonyStyleRector::class);
$services->set(FuncCallToConstFetchRector::class)
->call('configure', [[
FuncCallToConstFetchRector::FUNCTIONS_TO_CONSTANTS => [
'php_sapi_name' => 'PHP_SAPI',
'pi' => 'M_PI',
],
]]);
$services->set(SplitGroupedUseImportsRector::class);
$services->set(RemoveDoubleUnderscoreInMethodNameRector::class);
$services->set(PostIncDecToPreIncDecRector::class);
$services->set(UnSpreadOperatorRector::class);
};