| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | protected function parseFile(string $strConfigFile) : array |
||
| 36 | { |
||
| 37 | if (!file_exists($strConfigFile)) { |
||
| 38 | trigger_error('Config File (' . $strConfigFile . ') does not exist!', E_USER_WARNING); |
||
| 39 | } |
||
| 40 | |||
| 41 | $strYaml = file_get_contents($strConfigFile); |
||
| 42 | $aYAML = yaml_parse($strYaml); |
||
| 43 | if ($aYAML === false) { |
||
| 44 | // no codecoverage: haven't found example to test for returnvalue of false |
||
| 45 | trigger_error('Invalid config file (' . $strConfigFile . ')', E_USER_ERROR); // @codeCoverageIgnore |
||
| 46 | } |
||
| 47 | |||
| 48 | return $aYAML; |
||
| 49 | } |
||
| 51 |