1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of PHP CS Fixer. |
||
7 | * |
||
8 | * (c) Fabien Potencier <[email protected]> |
||
9 | * Dariusz Rumiński <[email protected]> |
||
10 | * |
||
11 | * This source file is subject to the MIT license that is bundled |
||
12 | * with this source code in the file LICENSE. |
||
13 | */ |
||
14 | |||
15 | $header = <<<'EOF' |
||
16 | This file is part of PHP CS Fixer. |
||
17 | |||
18 | (c) Fabien Potencier <[email protected]> |
||
19 | Dariusz Rumiński <[email protected]> |
||
20 | |||
21 | This source file is subject to the MIT license that is bundled |
||
22 | with this source code in the file LICENSE. |
||
23 | EOF; |
||
24 | |||
25 | $finder = PhpCsFixer\Finder::create() |
||
0 ignored issues
–
show
|
|||
26 | ->ignoreDotFiles(false) |
||
27 | ->ignoreVCSIgnored(true) |
||
28 | ->exclude('tests/Fixtures') |
||
29 | ->in(__DIR__) |
||
30 | ->append([ |
||
31 | __DIR__.'/dev-tools/doc.php', |
||
32 | // __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message |
||
33 | ]) |
||
34 | ; |
||
35 | |||
36 | $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 ![]() |
|||
37 | $config |
||
38 | ->setRiskyAllowed(true) |
||
39 | ->setRules([ |
||
40 | '@PHP74Migration' => true, |
||
41 | '@PSR12' => true, |
||
42 | ]) |
||
43 | ->setFinder($finder) |
||
44 | ; |
||
45 | |||
46 | // special handling of fabbot.io service if it's using too old PHP CS Fixer version |
||
47 | if (false !== getenv('FABBOT_IO')) { |
||
48 | try { |
||
49 | PhpCsFixer\FixerFactory::create() |
||
0 ignored issues
–
show
The type
PhpCsFixer\FixerFactory 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 ![]() |
|||
50 | ->registerBuiltInFixers() |
||
51 | ->registerCustomFixers($config->getCustomFixers()) |
||
52 | ->useRuleSet(new PhpCsFixer\RuleSet($config->getRules())) |
||
0 ignored issues
–
show
The type
PhpCsFixer\RuleSet 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 ![]() |
|||
53 | ; |
||
54 | } catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) { |
||
0 ignored issues
–
show
The type
PhpCsFixer\Configuration...dConfigurationException 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 ![]() |
|||
55 | $config->setRules([]); |
||
56 | } catch (UnexpectedValueException $e) { |
||
57 | $config->setRules([]); |
||
58 | } catch (InvalidArgumentException $e) { |
||
59 | $config->setRules([]); |
||
60 | } |
||
61 | } |
||
62 | |||
63 | return $config; |
||
64 |
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