| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 9 | final class CacheStorage implements StorageInterface |
||
| 10 | { |
||
| 11 | private CacheInterface $cache; |
||
| 12 | |||
| 13 | public function __construct(CacheInterface $cache) |
||
| 14 | { |
||
| 15 | $this->cache = $cache; |
||
| 16 | } |
||
| 17 | |||
| 18 | public function getCounterValue(string $id): int |
||
| 21 | } |
||
| 22 | |||
| 23 | public function setCounterValue(string $id, int $value, int $interval): void |
||
| 24 | { |
||
| 25 | $this->cache->set($id, $value, $interval); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function hasCounterValue(string $id): bool |
||
| 31 | } |
||
| 32 | } |
||
| 33 |