Total Complexity | 9 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class Parser |
||
6 | { |
||
7 | /** |
||
8 | * @var array |
||
9 | */ |
||
10 | private static $allowedExtensions = ['json', 'ini', 'xml', 'yaml', 'yml']; |
||
11 | |||
12 | /** |
||
13 | * @param string $filename |
||
14 | * |
||
15 | * @return array |
||
16 | * @throws \Exception |
||
17 | */ |
||
18 | public static function parse($filename) |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param string $filename |
||
33 | * |
||
34 | * @return mixed |
||
35 | */ |
||
36 | private static function getExt($filename) |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $ext |
||
43 | * |
||
44 | * @return ParserInterface |
||
45 | */ |
||
46 | private static function getParser($ext) |
||
64 |