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