Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class MemcachedRepository extends SimpleRepository |
||
9 | { |
||
10 | /** |
||
11 | * MemcachedRepository constructor. |
||
12 | * |
||
13 | * @param Memcached $memcached |
||
14 | */ |
||
15 | public function __construct(protected Memcached $memcached) |
||
16 | { |
||
17 | // |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * {@inheritdoc} |
||
22 | */ |
||
23 | 6 | protected function retrieve(string $key): mixed |
|
24 | { |
||
25 | 6 | return $this->memcached->get($key); |
|
26 | } |
||
27 | |||
28 | /** |
||
29 | * {@inheritdoc} |
||
30 | */ |
||
31 | 6 | protected function store(string $key, Collection $collection): bool |
|
32 | { |
||
33 | 6 | return $this->memcached->set($key, $collection); |
|
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 6 | public function flush(): bool |
|
42 | } |
||
43 | } |
||
44 |