| Conditions | 6 |
| Paths | 6 |
| Total Lines | 17 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 29.4373 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 12 | 1 | protected function init() |
|
| 13 | { |
||
| 14 | 1 | if (self::$container === null) { |
|
| 15 | switch ($this->type) { |
||
|
|
|||
| 16 | case 'native': |
||
| 17 | self::$container = Suricate::SessionNative(true); |
||
| 18 | break; |
||
| 19 | case 'cookie': |
||
| 20 | self::$container = Suricate::SessionCookie(true); |
||
| 21 | break; |
||
| 22 | case 'memcache': |
||
| 23 | self::$container = Suricate::SessionMemcache(true); |
||
| 24 | break; |
||
| 25 | case 'none': |
||
| 26 | break; |
||
| 27 | default: |
||
| 28 | throw new Exception("Unknown session type " . $this->type); |
||
| 29 | } |
||
| 78 |