Completed
Push — master ( fe5f39...abd96b )
by Tomáš
05:18 queued 02:13
created

FixerFileSystem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 17
wmc 1
lcom 0
cbo 1
ccs 7
cts 7
cp 1
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
use Symplify\MultiCodingStandard\Contract\PhpCsFixer\FileSystem\FixerFileSystemInterface;
14
15
final class FixerFileSystem implements FixerFileSystemInterface
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function findAllFixers()
21
    {
22 1
        $phpCsFixerReflection = new ReflectionClass(Fixer::class);
23 1
        $directoryWithFixers = dirname($phpCsFixerReflection->getFileName()) . '/Fixer';
24
25 1
        $finder = Finder::create()
26 1
            ->files()
27 1
            ->in($directoryWithFixers);
28
29 1
        return iterator_to_array($finder);
30
    }
31
}
32