Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 14 | public function parse(SplFileInfo $file) |
|
20 | { |
||
21 | 14 | $contents = require $file->getRealPath(); |
|
22 | |||
23 | 14 | if (!is_array($contents)) { |
|
24 | 1 | throw new RuntimeException(sprintf('The configuration file %s did not return an array', $file->getBasename('.php'))); |
|
25 | } |
||
26 | |||
27 | 13 | return $contents; |
|
28 | } |
||
30 |