Completed
Push — master ( 6ff8ac...850b68 )
by Tom
86:44 queued 66:31
created

FileLocator::locate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
1
<?php
2
3
namespace TomPHP\ConfigServiceProvider\FileReader;
4
5
final class FileLocator
6
{
7
    /**
8
     * @param array $patterns
9
     *
10
     * @return string[]
11
     */
12
    public function locate(array $patterns)
13
    {
14
        $files = [];
15
16
        foreach ($patterns as $pattern) {
17
            $files = array_merge($files, glob($pattern, GLOB_BRACE));
18
        }
19
20
        return $files;
21
    }
22
}
23