Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function read($filename) |
||
23 | { |
||
24 | Assertion::file($filename); |
||
25 | |||
26 | try { |
||
27 | $config = Yaml\Yaml::parse(file_get_contents($filename)); |
||
28 | } catch (Yaml\Exception\ParseException $exception) { |
||
29 | throw InvalidConfigException::fromYAMLFileError($filename, $exception->getMessage()); |
||
30 | } |
||
31 | |||
32 | return $config; |
||
33 | } |
||
34 | } |
||
35 |