1 | <?php |
||
2 | |||
3 | $finder = PhpCsFixer\Finder::create() |
||
0 ignored issues
–
show
|
|||
4 | ->exclude('build/') |
||
5 | ->exclude('docs/') |
||
6 | ->exclude('tests/') |
||
7 | ->exclude('vendor/') |
||
8 | ->in(__DIR__); |
||
9 | |||
10 | $config = new 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
11 | $config |
||
12 | ->setRiskyAllowed(true) |
||
13 | ->setIndent("\t") |
||
14 | ->setLineEnding("\n") |
||
15 | ->setRules([ |
||
16 | '@PSR12' => true, |
||
17 | '@PHP82Migration' => true, |
||
18 | 'align_multiline_comment' => true, |
||
19 | 'binary_operator_spaces' => true, |
||
20 | 'blank_line_after_namespace' => true, |
||
21 | 'blank_line_after_opening_tag' => true, |
||
22 | 'cast_spaces' => ['space' => 'single'], |
||
23 | 'clean_namespace' => true, |
||
24 | 'combine_nested_dirname' => true, |
||
25 | 'concat_space' => ['spacing' => 'one'], |
||
26 | 'dir_constant' => true, |
||
27 | 'is_null' => true, |
||
28 | 'type_declaration_spaces' => ['elements' => ['function', 'property']], |
||
29 | 'method_chaining_indentation' => true, |
||
30 | 'modernize_types_casting' => true, |
||
31 | 'no_alias_functions' => true, |
||
32 | 'no_blank_lines_after_phpdoc' => true, |
||
33 | 'no_null_property_initialization' => true, |
||
34 | 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false], |
||
35 | 'phpdoc_indent' => true, |
||
36 | 'phpdoc_no_package' => true, |
||
37 | 'phpdoc_order' => true, |
||
38 | 'phpdoc_scalar' => true, |
||
39 | 'phpdoc_types' => true, |
||
40 | 'phpdoc_types_order' => true, |
||
41 | 'psr_autoloading' => true, |
||
42 | 'ternary_operator_spaces' => true, |
||
43 | 'trim_array_spaces' => true, |
||
44 | 'whitespace_after_comma_in_array' => true, |
||
45 | ]) |
||
46 | ->setFinder($finder); |
||
47 | |||
48 | return $config; |
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