Issues (55)

.php-cs-fixer.dist.php (1 issue)

Severity
1
<?php
2
3
use PhpCsFixer\Config;
4
use PhpCsFixer\Finder;
5
6
$finder = Finder::create()
7
    ->in(__DIR__ .DIRECTORY_SEPARATOR.'src')
8
    ->in(__DIR__ .DIRECTORY_SEPARATOR.'tests')
9
    ->files([
0 ignored issues
show
The call to Symfony\Component\Finder\Finder::files() has too many arguments starting with array(__DIR__ . DIRECTOR...php-cs-fixer.dist.php'). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

9
    ->/** @scrutinizer ignore-call */ files([

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
10
        __DIR__.DIRECTORY_SEPARATOR.'.php-cs-fixer.dist.php',
11
    ])
12
    ->name('*.php')
13
;
14
15
$config = new Config();
16
$config
17
    ->setFinder($finder)
18
    ->setRiskyAllowed(false)
19
    ->setRules([
20
        '@PSR12' => true,
21
        'phpdoc_summary' => false,
22
        'no_unused_imports' => true,
23
    ])
24
;
25
26
return $config;
27