Total Complexity | 13 |
Total Lines | 100 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class NullCache implements Cache, AtomicCounter |
||
9 | { |
||
10 | /** |
||
11 | * @inheritDoc |
||
12 | */ |
||
13 | public function get($key, $default = null) |
||
14 | { |
||
15 | return $default; |
||
16 | } |
||
17 | |||
18 | /** |
||
19 | * @inheritDoc |
||
20 | */ |
||
21 | public function set($key, $value, $ttl = null) |
||
22 | { |
||
23 | return false; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @inheritDoc |
||
28 | */ |
||
29 | public function delete($key) |
||
30 | { |
||
31 | return false; |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @inheritDoc |
||
36 | */ |
||
37 | public function clean() |
||
38 | { |
||
39 | return false; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @inheritDoc |
||
44 | */ |
||
45 | public function flush() |
||
46 | { |
||
47 | return false; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @inheritDoc |
||
52 | */ |
||
53 | public function clear() |
||
54 | { |
||
55 | return false; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @inheritDoc |
||
60 | */ |
||
61 | public function getMultiple($keys, $default = null) |
||
62 | { |
||
63 | $defaults = []; |
||
64 | foreach ($keys as $key) { |
||
65 | $defaults[$key] = $default; |
||
66 | } |
||
67 | return $defaults; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @inheritDoc |
||
72 | */ |
||
73 | public function setMultiple($values, $ttl = null) |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @inheritDoc |
||
80 | */ |
||
81 | public function deleteMultiple($keys) |
||
82 | { |
||
83 | return false; |
||
84 | } |
||
85 | |||
86 | /** |
||
87 | * @inheritDoc |
||
88 | */ |
||
89 | public function has($key) |
||
90 | { |
||
91 | return false; |
||
92 | } |
||
93 | |||
94 | /** |
||
95 | * @inheritDoc |
||
96 | */ |
||
97 | public function increment($key, $step = 1, $ttl = null) |
||
100 | } |
||
101 | |||
102 | /** |
||
103 | * @inheritDoc |
||
104 | */ |
||
105 | public function decrement($key, $step = 1, $ttl = null) |
||
108 | } |
||
109 | } |
||
110 |