Issues (82)

.php-cs-fixer.php (2 issues)

Labels
Severity
1
<?php
2
3
use PhpCsFixer\Config;
0 ignored issues
show
The type PhpCsFixer\Config 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...
4
use PhpCsFixer\Finder;
0 ignored issues
show
The type PhpCsFixer\Finder 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...
5
6
$finder = Finder::create()
7
    ->in([
8
        __DIR__.'/src',
9
        __DIR__.'/tests',
10
    ])
11
    ->name('*.php')
12
;
13
14
$config = new Config();
15
$config
16
    ->setFinder($finder)
17
    ->setRules([
18
        '@PSR12' => true,
19
        'array_syntax' => ['syntax' => 'short'],
20
        'no_empty_phpdoc' => true,
21
        'no_unused_imports' => true,
22
        'no_superfluous_phpdoc_tags' => true,
23
        'ordered_imports' => true,
24
        'phpdoc_summary' => false,
25
        'protected_to_private' => false,
26
        'get_class_to_class_keyword' => false, // override for PHP < 8.0 (because ::class usage is not allowed there)
27
        'modernize_strpos' => false, // override for PHP < 8.0 (because str_contains not available in PHP 7.x)
28
    ])
29
;
30
31
return $config;
32