Completed
Pull Request — master (#10)
by Tomáš
31:42
created

FixerFileSystem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 17
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A findAllFixers() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of Symplify
5
 * Copyright (c) 2016 Tomas Votruba (http://tomasvotruba.cz).
6
 */
7
8
namespace Symplify\MultiCodingStandard\PhpCsFixer\FileSystem;
9
10
use ReflectionClass;
11
use Symfony\Component\Finder\Finder;
12
use Symfony\CS\Fixer;
13
14
final class FixerFileSystem
15
{
16
    /**
17
     * @return string[]
18
     */
19
    public function findAllFixers() : array
20
    {
21
        $phpCsFixerReflection = new ReflectionClass(Fixer::class);
22
        $directoryWithFixers = dirname($phpCsFixerReflection->getFileName()) . '/Fixer';
23
24
        $finder = Finder::create()
25
            ->files()
26
            ->in($directoryWithFixers);
27
28
        return iterator_to_array($finder);
29
    }
30
}
31