| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | 6 | public static function getStorage(string $type, array $options, LoggerInterface $logger): Tiqr_UserStorage_Interface |
|
| 45 | { |
||
| 46 | switch ($type) { |
||
| 47 | 6 | case "file": |
|
| 48 | 1 | return new Tiqr_UserStorage_File($options, $logger); |
|
| 49 | 5 | case "pdo": |
|
| 50 | 3 | return new Tiqr_UserStorage_Pdo($options, $logger); |
|
| 51 | } |
||
| 52 | |||
| 53 | 2 | throw new RuntimeException(sprintf('Unable to create a UserStorage instance of type: %s', $type)); |
|
| 54 | } |
||
| 56 |