ConsolidatedConfigurationFinder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 16
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFiles() 0 10 2
1
<?php
2
3
/*
4
 * This file is part of Rocketeer
5
 *
6
 * (c) Maxime Fabre <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 */
12
13
namespace Rocketeer\Services\Config\Files\Finders;
14
15
use Symfony\Component\Finder\SplFileInfo;
16
17
/**
18
 * Finds a consolidated configuration file (rocketeer.xxx).
19
 */
20
class ConsolidatedConfigurationFinder extends AbstractConfigurationFinder
21
{
22
    /**
23
     * @return SplFileInfo[]
24
     */
25
    public function getFiles()
26
    {
27
        $files = $this->getFinder($this->folder)->name('/^rocketeer\./')->files();
28
        $files = iterator_to_array($files);
29
        if (!$files) {
30
            return [];
31
        }
32
33
        return [head($files)];
34
    }
35
}
36