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