| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function parse($configFile) |
||
| 22 | { |
||
| 23 | if ('/' !== substr($configFile, 0, 1)) { |
||
| 24 | $configFile = ROOT_PATH.'/'.$configFile; |
||
| 25 | } |
||
| 26 | |||
| 27 | if (!is_file($configFile) || !is_readable($configFile)) { |
||
| 28 | throw new \InvalidArgumentException(sprintf('Le fichier de config est inutilisable: %s', $configFile)); |
||
| 29 | } |
||
| 30 | |||
| 31 | $configs = Yaml::parse(file_get_contents($configFile)); |
||
| 32 | |||
| 33 | $processor = new Processor(); |
||
| 34 | return $processor->processConfiguration(new ConfigExpertConfiguration(), $configs); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |