Passed
Pull Request — master (#1827)
by Tarmo
64:06
created
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
The type PhpCsFixer\Fixer\ArrayNo...eAroundDoubleArrowFixer 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
32
use Symplify\EasyCodingStandard\Config\ECSConfig;
0 ignored issues
show
The type Symplify\EasyCodingStandard\Config\ECSConfig 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
33
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
0 ignored issues
show
The type Symplify\EasyCodingStand...ValueObject\Set\SetList 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. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
34
35
return static function (ECSConfig $ecsConfig): void {
36
    $ecsConfig->paths([
37
        __DIR__ . '/src',
38
        __DIR__ . '/tests',
39
    ]);
40
41
    $ecsConfig->sets([SetList::PSR_12, SetList::CLEAN_CODE, SetList::COMMON]);
42
43
    $ruleConfigurations = [
44
        [
45
            IncrementStyleFixer::class,
46
            ['style' => 'post'],
47
        ],
48
        [
49
            CastSpacesFixer::class,
50
            ['space' => 'none'],
51
        ],
52
        [
53
            YodaStyleFixer::class,
54
            [
55
                'equal' => false,
56
                'identical' => false,
57
                'less_and_greater' => false,
58
            ],
59
        ],
60
        [
61
            ConcatSpaceFixer::class,
62
            ['spacing' => 'one'],
63
        ],
64
        [
65
            CastSpacesFixer::class,
66
            ['space' => 'none'],
67
        ],
68
        [
69
            OrderedImportsFixer::class,
70
            ['imports_order' => ['class', 'function', 'const']],
71
        ],
72
        [
73
            NoSuperfluousPhpdocTagsFixer::class,
74
            [
75
                'remove_inheritdoc' => false,
76
                'allow_mixed' => true,
77
                'allow_unused_params' => false,
78
            ],
79
        ],
80
        [
81
            DeclareEqualNormalizeFixer::class,
82
            ['space' => 'single'],
83
        ],
84
        [
85
            BlankLineBeforeStatementFixer::class,
86
            ['statements' => ['continue', 'declare', 'return', 'throw', 'try']],
87
        ],
88
        [
89
            BinaryOperatorSpacesFixer::class,
90
            ['operators' => ['&' => 'align']],
91
        ],
92
    ];
93
94
    array_map(static fn ($parameters) => $ecsConfig->ruleWithConfiguration(...$parameters), $ruleConfigurations);
95
96
    $ecsConfig->skip([
97
        NoMultilineWhitespaceAroundDoubleArrowFixer::class => null,
98
        PhpdocNoPackageFixer::class => null,
99
        PhpdocSummaryFixer::class => null,
100
        PhpdocSeparationFixer::class => null,
101
        BlankLineAfterOpeningTagFixer::class => null,
102
        ClassAttributesSeparationFixer::class => null,
103
        NoBlankLinesBeforeNamespaceFixer::class => null,
104
        NotOperatorWithSuccessorSpaceFixer::class => null,
105
        SingleLineThrowFixer::class => null,
106
        PhpdocAlignFixer::class => null,
107
        PhpdocToCommentFixer::class => null,
108
        NativeFunctionInvocationFixer::class => null,
109
    ]);
110
};
111