Issues (346)

code/ecs.php (12 issues)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
use ObjectCalisthenics\Sniffs\Classes\ForbiddenPublicPropertySniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...ddenPublicPropertySniff 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...
6
use ObjectCalisthenics\Sniffs\CodeAnalysis\OneObjectOperatorPerLineSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...ectOperatorPerLineSniff 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...
7
use ObjectCalisthenics\Sniffs\ControlStructures\NoElseSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...lStructures\NoElseSniff 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...
8
use ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...les\FunctionLengthSniff 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...
9
use ObjectCalisthenics\Sniffs\Metrics\MaxNestingLevelSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...cs\MaxNestingLevelSniff 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...
10
use ObjectCalisthenics\Sniffs\Metrics\MethodPerClassLimitSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...ethodPerClassLimitSniff 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...
11
use ObjectCalisthenics\Sniffs\Metrics\PropertyPerClassLimitSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...pertyPerClassLimitSniff 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 ObjectCalisthenics\Sniffs\NamingConventions\ElementNameMinimalLengthSniff;
0 ignored issues
show
The type ObjectCalisthenics\Sniff...tNameMinimalLengthSniff 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\ArrayNotation\ArraySyntaxFixer;
0 ignored issues
show
The type PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer 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 Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
0 ignored issues
show
The type Symfony\Component\Depend...r\ContainerConfigurator 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 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. 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 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...
17
18
include 'src/Crossword/config/ecs.php';
19
include 'src/Dictionary/config/ecs.php';
20
include 'src/Game/config/ecs.php';
21
include 'src/SharedKernel/config/ecs.php';
22
23
return static function (ContainerConfigurator $containerConfigurator): void {
24
    $services = $containerConfigurator->services();
25
    $services->set(ArraySyntaxFixer::class)
26
        ->call('configure', [[
27
            'syntax' => 'short',
28
        ]]);
29
30
    // Object Calisthenics rules. See: https://github.com/object-calisthenics/phpcs-calisthenics-rules
31
    $services->set(MaxNestingLevelSniff::class);
32
    $services->set(NoElseSniff::class);
33
    $services->set(OneObjectOperatorPerLineSniff::class);
34
    $services->set(ElementNameMinimalLengthSniff::class);
35
    $services->set(FunctionLengthSniff::class);
36
    $services->set(MethodPerClassLimitSniff::class);
37
    $services->set(PropertyPerClassLimitSniff::class);
38
    $services->set(ForbiddenPublicPropertySniff::class);
39
40
    $parameters = $containerConfigurator->parameters();
41
    $parameters->set(Option::PATHS, [
42
        __DIR__ . '/src',
43
        __DIR__ . '/tests',
44
    ]);
45
46
    $parameters->set(Option::SETS, [
47
        SetList::ARRAY,
48
        SetList::DOCBLOCK,
49
        SetList::NAMESPACES,
50
        SetList::CLEAN_CODE,
51
        SetList::PSR_12,
52
    ]);
53
54
    $parameters->set(
55
        Option::SKIP,
56
        array_merge(
57
            [__DIR__ . '/src/Kernel.php'],
58
            array_map(static fn (string $path) => __DIR__ . $path, CROSSWORD_SKIP_PATH),
59
            array_map(static fn (string $path) => __DIR__ . $path, DICTIONARY_SKIP_PATH),
60
            array_map(static fn (string $path) => __DIR__ . $path, GAME_SKIP_PATH),
61
            array_map(static fn (string $path) => __DIR__ . $path, SHARED_KERNEL_SKIP_PATH),
62
        )
63
    );
64
};
65