| Total Complexity | 9 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | class NullCache implements CacheInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | 3 | public function get($key, $default = null) |
|
| 31 | { |
||
| 32 | 3 | return $default; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | * |
||
| 38 | * @return mixed |
||
| 39 | */ |
||
| 40 | 1 | public function getMultiple($keys, $default = null) |
|
| 41 | { |
||
| 42 | 1 | foreach ($keys as $key) { |
|
| 43 | 1 | yield $key => $default; |
|
| 44 | } |
||
| 45 | 1 | } |
|
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | 1 | public function has($key): bool |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | 1 | public function clear(): bool |
|
| 59 | { |
||
| 60 | 1 | return true; |
|
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritdoc} |
||
| 65 | */ |
||
| 66 | 1 | public function delete($key): bool |
|
| 67 | { |
||
| 68 | 1 | return true; |
|
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | 1 | public function deleteMultiple($keys): bool |
|
| 75 | { |
||
| 76 | 1 | return true; |
|
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * {@inheritdoc} |
||
| 81 | */ |
||
| 82 | 1 | public function set($key, $value, $ttl = null): bool |
|
| 83 | { |
||
| 84 | 1 | return false; |
|
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * {@inheritdoc} |
||
| 89 | */ |
||
| 90 | 1 | public function setMultiple($values, $ttl = null): bool |
|
| 93 | } |
||
| 94 | } |
||
| 95 |