Total Complexity | 10 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Parser |
||
8 | { |
||
9 | /** |
||
10 | * @var array |
||
11 | */ |
||
12 | private static $allowedExtensions = ['json', 'ini', 'xml', 'yaml', 'yml']; |
||
13 | |||
14 | /** |
||
15 | * @param string $filename |
||
16 | * |
||
17 | * @return array |
||
18 | * @throws ParserException |
||
19 | */ |
||
20 | public static function parse($filename) |
||
34 | } |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param string $filename |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | private static function getExt($filename) |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param string $ext |
||
49 | * |
||
50 | * @return ParserInterface |
||
51 | */ |
||
52 | private static function getParser($ext) |
||
70 |
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.