1 | <?php |
||
2 | |||
3 | use PhpCsFixer\Config; |
||
0 ignored issues
–
show
|
|||
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
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 | ->setRiskyAllowed(true) |
||
18 | ->setRules([ |
||
19 | '@Symfony' => true, |
||
20 | '@Symfony:risky' => true, |
||
21 | 'array_syntax' => ['syntax' => 'short'], |
||
22 | 'no_empty_phpdoc' => true, |
||
23 | 'no_unused_imports' => true, |
||
24 | 'no_superfluous_phpdoc_tags' => true, |
||
25 | 'ordered_imports' => true, |
||
26 | 'phpdoc_summary' => false, |
||
27 | 'protected_to_private' => false, |
||
28 | 'get_class_to_class_keyword' => false, // override for PHP < 8.0 (because ::class usage is not allowed there) |
||
29 | 'modernize_strpos' => false, // override for PHP < 8.0 (because str_contains not available in PHP 7.x) |
||
30 | ]) |
||
31 | ; |
||
32 | |||
33 | return $config; |
||
34 |
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