Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
56 | 9 | protected function getFiles($extension) |
|
57 | { |
||
58 | 9 | $finder = new Finder(); |
|
59 | 9 | $finder->in($this->folderToExtract); |
|
60 | 9 | $files = []; |
|
61 | /* @var SplFileInfo $file */ |
||
62 | 9 | foreach ($finder->files()->name('*.' . $extension) as $file) { |
|
63 | 9 | $files[] = substr($file->getFilename(), 0, -(strlen($extension) + 1)); |
|
64 | } |
||
65 | |||
66 | 9 | return array_combine($files, $files); |
|
67 | } |
||
69 |