Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public static function parse($filename) |
||
19 | { |
||
20 | $ext = self::getExt($filename); |
||
21 | |||
22 | if (false === in_array($ext, self::$allowedExtensions)) { |
||
23 | throw new \InvalidArgumentException($ext . ' is not a valid configuration file.'); |
||
24 | } |
||
25 | |||
26 | $parser = self::getParser($ext); |
||
27 | |||
28 | return $parser->parse($filename); |
||
29 | } |
||
64 |