Total Complexity | 6 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
9 | class Cache implements CacheInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var \Symfony\Component\Cache\Adapter\AbstractAdapter |
||
13 | */ |
||
14 | protected $cacheAdapter; |
||
15 | |||
16 | /** |
||
17 | * @param \Symfony\Component\Cache\Adapter\AbstractAdapter $cacheAdapter |
||
18 | */ |
||
19 | public function __construct(AbstractAdapter $cacheAdapter) |
||
20 | { |
||
21 | $this->cacheAdapter = $cacheAdapter; |
||
22 | } |
||
23 | |||
24 | |||
25 | /** |
||
26 | * @param string $key |
||
27 | * |
||
28 | * @return string|null |
||
29 | */ |
||
30 | public function get(string $key): ?string |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @param string $key |
||
43 | * @param string $value |
||
44 | * @param int|null $lifeTime |
||
45 | * |
||
46 | * @return \Jellyfish\Cache\CacheInterface |
||
47 | * |
||
48 | * @throws \Jellyfish\Cache\Exception\InvalidLifeTimeException |
||
49 | */ |
||
50 | public function set(string $key, string $value, ?int $lifeTime = null): CacheInterface |
||
66 |