1 | <?php |
||
2 | declare(strict_types = 1); |
||
3 | /** |
||
4 | * /ecs.php |
||
5 | * |
||
6 | * Configuration for `EasyCodingStandard` tool. |
||
7 | * |
||
8 | * @author TLe, Tarmo Leppänen <[email protected]> |
||
9 | */ |
||
10 | |||
11 | use PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer; |
||
0 ignored issues
–
show
|
|||
12 | use PhpCsFixer\Fixer\CastNotation\CastSpacesFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\CastNotation\CastSpacesFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
13 | use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\ClassNo...tributesSeparationFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
14 | use PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
15 | use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Functio...FunctionInvocationFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
16 | use PhpCsFixer\Fixer\FunctionNotation\SingleLineThrowFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Functio...on\SingleLineThrowFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
17 | use PhpCsFixer\Fixer\Import\OrderedImportsFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Import\OrderedImportsFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
18 | use PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Languag...lareEqualNormalizeFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
19 | use PhpCsFixer\Fixer\NamespaceNotation\NoBlankLinesBeforeNamespaceFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Namespa...nesBeforeNamespaceFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
20 | use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Operato...naryOperatorSpacesFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
21 | use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
22 | use PhpCsFixer\Fixer\Operator\IncrementStyleFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Operator\IncrementStyleFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
23 | use PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Operato...WithSuccessorSpaceFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
24 | use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\...erfluousPhpdocTagsFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
25 | use PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
26 | use PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
27 | use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
28 | use PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\PhpdocSummaryFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
29 | use PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Phpdoc\PhpdocToCommentFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
30 | use PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\PhpTag\...ineAfterOpeningTagFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
31 | use PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer; |
||
0 ignored issues
–
show
The type
PhpCsFixer\Fixer\Whitesp...ineBeforeStatementFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
32 | use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; |
||
33 | use Symplify\CodingStandard\Fixer\Strict\BlankLineAfterStrictTypesFixer; |
||
0 ignored issues
–
show
The type
Symplify\CodingStandard\...neAfterStrictTypesFixer was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
34 | use Symplify\EasyCodingStandard\ValueObject\Option; |
||
0 ignored issues
–
show
The type
Symplify\EasyCodingStandard\ValueObject\Option was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
35 | |||
36 | return static function (ContainerConfigurator $containerConfigurator): void { |
||
37 | $imports = [ |
||
38 | '/tools/04_symplify/vendor/symplify/easy-coding-standard/config/set/psr12.php', |
||
39 | '/tools/04_symplify/vendor/symplify/easy-coding-standard/config/set/clean-code.php', |
||
40 | '/tools/04_symplify/vendor/symplify/easy-coding-standard/config/set/common.php', |
||
41 | '/tools/04_symplify/vendor/symplify/easy-coding-standard/config/set/symfony.php', |
||
42 | '/tools/04_symplify/vendor/symplify/easy-coding-standard/config/set/symfony-risky.php', |
||
43 | ]; |
||
44 | |||
45 | array_map( |
||
46 | [$containerConfigurator, 'import'], |
||
47 | array_map(static fn (string $path): string => __DIR__ . $path, $imports) |
||
48 | ); |
||
49 | |||
50 | $services = $containerConfigurator->services(); |
||
51 | |||
52 | $services |
||
53 | ->set(IncrementStyleFixer::class) |
||
54 | ->call( |
||
55 | 'configure', |
||
56 | [ |
||
57 | [ |
||
58 | 'style' => 'post', |
||
59 | ], |
||
60 | ], |
||
61 | ); |
||
62 | |||
63 | $services |
||
64 | ->set(YodaStyleFixer::class) |
||
65 | ->call( |
||
66 | 'configure', |
||
67 | [ |
||
68 | [ |
||
69 | 'equal' => false, |
||
70 | 'identical' => false, |
||
71 | 'less_and_greater' => false, |
||
72 | ], |
||
73 | ], |
||
74 | ); |
||
75 | |||
76 | $services |
||
77 | ->set(ConcatSpaceFixer::class) |
||
78 | ->call( |
||
79 | 'configure', |
||
80 | [ |
||
81 | [ |
||
82 | 'spacing' => 'one', |
||
83 | ], |
||
84 | ], |
||
85 | ); |
||
86 | |||
87 | $services |
||
88 | ->set(CastSpacesFixer::class) |
||
89 | ->call( |
||
90 | 'configure', |
||
91 | [ |
||
92 | [ |
||
93 | 'space' => 'none', |
||
94 | ], |
||
95 | ], |
||
96 | ); |
||
97 | |||
98 | $services |
||
99 | ->set(OrderedImportsFixer::class) |
||
100 | ->call( |
||
101 | 'configure', |
||
102 | [ |
||
103 | [ |
||
104 | 'imports_order' => ['class', 'function', 'const'], |
||
105 | ], |
||
106 | ], |
||
107 | ); |
||
108 | |||
109 | $services |
||
110 | ->set(NoSuperfluousPhpdocTagsFixer::class) |
||
111 | ->call( |
||
112 | 'configure', |
||
113 | [ |
||
114 | [ |
||
115 | 'remove_inheritdoc' => false, |
||
116 | 'allow_mixed' => true, |
||
117 | 'allow_unused_params' => false, |
||
118 | ], |
||
119 | ], |
||
120 | ); |
||
121 | |||
122 | $services |
||
123 | ->set(DeclareEqualNormalizeFixer::class) |
||
124 | ->call( |
||
125 | 'configure', |
||
126 | [ |
||
127 | [ |
||
128 | 'space' => 'single', |
||
129 | ], |
||
130 | ], |
||
131 | ); |
||
132 | |||
133 | $services |
||
134 | ->set(BlankLineBeforeStatementFixer::class) |
||
135 | ->call( |
||
136 | 'configure', |
||
137 | [ |
||
138 | [ |
||
139 | 'statements' => ['continue', 'declare', 'return', 'throw', 'try'], |
||
140 | ], |
||
141 | ], |
||
142 | ); |
||
143 | |||
144 | $services |
||
145 | ->set(BinaryOperatorSpacesFixer::class) |
||
146 | ->call( |
||
147 | 'configure', |
||
148 | [ |
||
149 | [ |
||
150 | 'operators' => [ |
||
151 | '&' => 'align', |
||
152 | ], |
||
153 | ], |
||
154 | ], |
||
155 | ); |
||
156 | |||
157 | $parameters = $containerConfigurator->parameters(); |
||
158 | |||
159 | $parameters->set( |
||
160 | 'skip', |
||
161 | [ |
||
162 | NoMultilineWhitespaceAroundDoubleArrowFixer::class => null, |
||
163 | PhpdocNoPackageFixer::class => null, |
||
164 | PhpdocSummaryFixer::class => null, |
||
165 | PhpdocSeparationFixer::class => null, |
||
166 | BlankLineAfterOpeningTagFixer::class => null, |
||
167 | ClassAttributesSeparationFixer::class => null, |
||
168 | NoBlankLinesBeforeNamespaceFixer::class => null, |
||
169 | NotOperatorWithSuccessorSpaceFixer::class => null, |
||
170 | SingleLineThrowFixer::class => null, |
||
171 | BlankLineAfterStrictTypesFixer::class => null, |
||
172 | PhpdocAlignFixer::class => null, |
||
173 | PhpdocToCommentFixer::class => null, |
||
174 | NativeFunctionInvocationFixer::class => null, |
||
175 | ] |
||
176 | ); |
||
177 | |||
178 | $parameters->set(Option::PARALLEL, true); |
||
179 | }; |
||
180 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths