Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 6 | public function handle(array $keys = array(), $directory = '', $recursive = false) |
|
27 | { |
||
28 | 6 | $contents = $this->filesystem->listContents($directory, $recursive); |
|
29 | |||
30 | 6 | foreach ($contents as $index => $object) { |
|
31 | 6 | if ($object['type'] === 'file') { |
|
32 | 6 | $missingKeys = array_diff($keys, array_keys($object)); |
|
33 | 6 | $contents[$index] = array_reduce($missingKeys, array($this, 'getMetadataByName'), $object); |
|
34 | 3 | } |
|
35 | 3 | } |
|
36 | |||
37 | 3 | return $contents; |
|
38 | } |
||
39 | |||
61 |