| Total Complexity | 9 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | final class NullCache implements CacheInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | * |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | 13 | public function get($key, $default = null) |
|
| 31 | { |
||
| 32 | 13 | return $default; |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * {@inheritdoc} |
||
| 37 | * |
||
| 38 | * @return iterable |
||
| 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 | 1 | public function clear(): bool |
|
| 56 | { |
||
| 57 | 1 | return true; |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | 1 | public function delete($key): bool |
|
| 64 | { |
||
| 65 | 1 | return true; |
|
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc} |
||
| 70 | */ |
||
| 71 | 1 | public function deleteMultiple($keys): bool |
|
| 72 | { |
||
| 73 | 1 | return true; |
|
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritdoc} |
||
| 78 | */ |
||
| 79 | 11 | public function set($key, $value, $ttl = null): bool |
|
| 80 | { |
||
| 81 | 11 | return false; |
|
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * {@inheritdoc} |
||
| 86 | */ |
||
| 87 | 1 | public function setMultiple($values, $ttl = null): bool |
|
| 90 | } |
||
| 91 | } |
||
| 92 |