| Conditions | 5 |
| Paths | 8 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public static function create($fileName, $format = null) |
||
| 27 | { |
||
| 28 | if ($format === null) |
||
| 29 | $format = Setting::getString('playlistFormat'); |
||
| 30 | |||
| 31 | switch ($format) |
||
| 32 | { |
||
| 33 | case Playlist::TYPE_M3U: |
||
| 34 | return new M3UPlaylist($fileName); |
||
| 35 | case Playlist::TYPE_XSPF: |
||
| 36 | return new XSPFPlaylist($fileName); |
||
| 37 | case Playlist::TYPE_PLS: |
||
| 38 | return new PLSPlaylist($fileName); |
||
| 39 | default: |
||
| 40 | throw new InvalidRequestException(); |
||
| 41 | } |
||
| 57 |