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); |
||
12 | 5 | protected function init() |
|
13 | { |
||
14 | 5 | if (self::$container === null) { |
|
15 | 2 | switch ($this->type) { |
|
|
|||
16 | 2 | case 'native': |
|
17 | 1 | self::$container = Suricate::SessionNative(true); |
|
18 | 1 | break; |
|
19 | 1 | case 'cookie': |
|
20 | self::$container = Suricate::SessionCookie(true); |
||
21 | break; |
||
22 | 1 | case 'memcache': |
|
23 | self::$container = Suricate::SessionMemcache(true); |
||
24 | break; |
||
25 | 1 | case 'none': |
|
26 | break; |
||
27 | default: |
||
28 | 1 | throw new Exception("Unknown session type " . $this->type); |
|
29 | } |
||
78 |