Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public static function create(string $packageType, string $filePath, Course $course, ?Session $session = null) |
||
50 | { |
||
51 | switch ($packageType) { |
||
52 | case 'tincan': |
||
53 | return new TinCanParser($filePath, $course, $session); |
||
54 | |||
55 | case 'cmi5': |
||
56 | return new Cmi5Parser($filePath, $course, $session); |
||
57 | |||
58 | default: |
||
59 | throw new Exception('Invalid package.'); |
||
60 | } |
||
65 |