Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function read($filename) |
||
12 | { |
||
13 | Assertion::file($filename); |
||
14 | |||
15 | try { |
||
16 | $config = Yaml\Yaml::parse(file_get_contents($filename)); |
||
17 | } catch (Yaml\Exception\ParseException $exception) { |
||
18 | throw InvalidConfigException::fromYAMLFileError($filename, $exception->getMessage()); |
||
19 | } |
||
20 | |||
21 | return $config; |
||
22 | } |
||
23 | } |
||
24 |