| Total Complexity | 4 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class CacheCounterStorage implements CounterStorageInterface |
||
| 13 | { |
||
| 14 | private CacheInterface $cache; |
||
| 15 | |||
| 16 | public function __construct(CacheInterface $cache) |
||
| 17 | { |
||
| 18 | $this->cache = $cache; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function get(string $id): int |
||
| 22 | { |
||
| 23 | return $this->cache->get($id, 0); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function set(string $id, int $value, int $interval): void |
||
| 29 | } |
||
| 30 | |||
| 31 | public function has(string $id): bool |
||
| 34 | } |
||
| 35 | } |
||
| 36 |