Conditions | 4 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
54 | private function getReaderClass($filename) |
||
55 | { |
||
56 | $readerClass = null; |
||
57 | |||
58 | foreach ($this->config as $extension => $className) { |
||
59 | if ($this->endsWith($filename, $extension)) { |
||
60 | $readerClass = $className; |
||
61 | break; |
||
62 | } |
||
63 | } |
||
64 | |||
65 | if ($readerClass === null) { |
||
66 | throw UnknownFileTypeException::fromFileExtension( |
||
67 | $filename, |
||
68 | array_keys($this->config) |
||
69 | ); |
||
70 | } |
||
71 | |||
72 | return $readerClass; |
||
73 | } |
||
74 | |||
86 |