| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | private function loadSources($location, array $sources) |
||
| 35 | { |
||
| 36 | 2 | return array_reduce($sources, function (array $config, string $source) use ($location): array { |
|
| 37 | 2 | $filepath = $location.$source; |
|
| 38 | 2 | if (is_readable($filepath)) { |
|
| 39 | 2 | return array_replace_recursive($config, $this->yamlParser->parse(file_get_contents($filepath))); |
|
| 40 | } |
||
| 41 | return $config; |
||
| 42 | 2 | }, []); |
|
| 43 | } |
||
| 44 | } |
||
| 45 |