| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public static function read(string $sConfigFile): array |
||
| 36 | { |
||
| 37 | $sConfigFile = realpath($sConfigFile); |
||
| 38 | if(!is_readable($sConfigFile)) |
||
| 39 | { |
||
| 40 | throw new FileAccess($sConfigFile); |
||
| 41 | } |
||
| 42 | $aConfigOptions = include($sConfigFile); |
||
| 43 | if(!is_array($aConfigOptions)) |
||
| 44 | { |
||
| 45 | throw new FileContent($sConfigFile); |
||
| 46 | } |
||
| 47 | |||
| 48 | return $aConfigOptions; |
||
| 49 | } |
||
| 51 |