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