| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function getConfigs(): array |
||
| 20 | { |
||
| 21 | if (!is_file($this->filename) || !is_readable($this->filename)) { |
||
| 22 | throw new \RuntimeException("Unable to read configs from {$this->filename}"); |
||
| 23 | } |
||
| 24 | |||
| 25 | try { |
||
| 26 | return Yaml::parseFile($this->filename); |
||
|
|
|||
| 27 | } catch (ParseException $exception) { |
||
| 28 | throw new \RuntimeException("Unable to parse '{$this->filename}': {$exception->getMessage()}"); |
||
| 29 | } |
||
| 37 |