Passed
Push — master ( 2f0dcd...638ea4 )
by Mihai
02:42 queued 12s
created

.php-cs-fixer.dist.php (5 issues)

Labels
Severity
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
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...
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. 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...
37
$config
38
    ->setRiskyAllowed(true)
39
    ->setRules([
40
        '@PSR12' => true,
41
    ])
42
    ->setFinder($finder)
43
;
44
45
// special handling of fabbot.io service if it's using too old PHP CS Fixer version
46
if (false !== getenv('FABBOT_IO')) {
47
    try {
48
        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. 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...
49
            ->registerBuiltInFixers()
50
            ->registerCustomFixers($config->getCustomFixers())
51
            ->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. 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...
52
        ;
53
    } 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. 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...
54
        $config->setRules([]);
55
    } catch (UnexpectedValueException $e) {
56
        $config->setRules([]);
57
    } catch (InvalidArgumentException $e) {
58
        $config->setRules([]);
59
    }
60
}
61
62
return $config;
63