Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | class NullDriver implements SessionDriverInterface |
||
20 | { |
||
21 | /** |
||
22 | * Returns the value store with provided key or the default value. |
||
23 | * |
||
24 | * @param string $key The key used to store the value in session. |
||
25 | * @param string $default The default value if no value was stored. |
||
26 | * |
||
27 | * @return mixed The stored value or the default value if key |
||
28 | * was not found. |
||
29 | */ |
||
30 | public function get($key, $default = null) |
||
31 | { |
||
32 | return $default; |
||
33 | 2 | } |
|
34 | |||
35 | 2 | /** |
|
36 | * Set/Stores a provided values with a given key. |
||
37 | * |
||
38 | * @param string $key The key used to store the value in session. |
||
39 | * @param mixed $value The value to store under the provided key. |
||
40 | * |
||
41 | * @return self|$this|SessionDriverInterface Self instance for |
||
42 | * method call chains. |
||
43 | */ |
||
44 | public function set($key, $value) |
||
45 | { |
||
46 | return $this; |
||
47 | 2 | } |
|
48 | |||
49 | 2 | /** |
|
50 | * Erases the values stored with the given key. |
||
51 | * |
||
52 | * @param string $key The key used to store the value in session. |
||
53 | * |
||
54 | * @return self|$this|SessionDriverInterface Self instance for |
||
55 | * method call chains. |
||
56 | */ |
||
57 | public function erase($key) |
||
60 | 2 | } |
|
61 | } |
||
62 |