| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class MemoryStore implements Store |
||
| 13 | { |
||
| 14 | /** @var array<string, Counter> */ |
||
| 15 | private array $cache = []; |
||
| 16 | |||
| 17 | 20 | public function hit(Key $key): Counter |
|
| 18 | { |
||
| 19 | 20 | return $this->cache[(string) $key] = $this->status($key)->addHit(); |
|
| 20 | } |
||
| 21 | |||
| 22 | 21 | public function status(Key $key): Counter |
|
| 31 | } |
||
| 32 | |||
| 33 | 12 | public function reset(Key $key): void |
|
| 36 | 12 | } |
|
| 37 | } |
||
| 38 |