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