Conditions | 5 |
Paths | 5 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function createFormat(\SplFileObject $file) |
||
22 | { |
||
23 | switch (strtolower($file->getExtension())) { |
||
24 | case 'markdown': |
||
25 | case 'mdown': |
||
26 | case 'mkdn': |
||
27 | case 'md': |
||
28 | return new Markdown; |
||
29 | } |
||
30 | throw new RuntimeException("Unknown file extension .{$file->getExtension()}"); |
||
31 | } |
||
32 | } |
||
33 |