FileFinder::list()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 9
nc 1
nop 1
dl 0
loc 10
ccs 9
cts 9
cp 1
crap 1
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpNsFixer\Finder;
6
7
use Symfony\Component\Finder\Finder;
8
use Tightenco\Collect\Support\Collection;
9
10
final class FileFinder
11
{
12 6
    public static function list(string $path): Collection
13
    {
14 6
        return collect(
15 6
            Finder::create()
16 6
                ->name('*.php')
17 6
                ->name('*.phpt')
18 6
                ->ignoreDotFiles(true)
19 6
                ->ignoreVCS(true)
20 6
                ->exclude('vendor')
21 6
                ->in($path)
22
        );
23
    }
24
}
25