Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
6 | final class SetCacheException extends CacheException |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | private $key; |
||
12 | private $value; |
||
13 | |||
14 | /** |
||
15 | * @var CacheInterface |
||
16 | */ |
||
17 | private $cache; |
||
18 | |||
19 | public function __construct( |
||
20 | string $key, |
||
21 | $value, |
||
22 | CacheInterface $cache, |
||
23 | $message = 'Could not store the value in the cache', |
||
24 | $code = 0, |
||
25 | \Throwable $previous = null |
||
26 | ) { |
||
27 | $this->key = $key; |
||
28 | $this->value = $value; |
||
29 | $this->cache = $cache; |
||
30 | parent::__construct($message, $code, $previous); |
||
31 | } |
||
32 | |||
33 | public function getKey(): string |
||
34 | { |
||
35 | return $this->key; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return mixed |
||
40 | */ |
||
41 | public function getValue() |
||
42 | { |
||
43 | return $this->value; |
||
44 | } |
||
45 | |||
46 | public function getCache(): CacheInterface |
||
49 | } |
||
50 | } |
||
51 |