| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class SetCacheException extends CacheException |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var mixed |
||
| 13 | */ |
||
| 14 | private $value; |
||
| 15 | private CacheItem $item; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param string $key |
||
| 19 | * @param mixed $value |
||
| 20 | * @param CacheItem $item |
||
| 21 | */ |
||
| 22 | 2 | public function __construct(string $key, $value, CacheItem $item) |
|
| 23 | { |
||
| 24 | 2 | $this->value = $value; |
|
| 25 | 2 | $this->item = $item; |
|
| 26 | 2 | parent::__construct($key, 'Failed to store the value in the cache.'); |
|
| 27 | 2 | } |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @return mixed |
||
| 31 | */ |
||
| 32 | 1 | public function getValue() |
|
| 33 | { |
||
| 34 | 1 | return $this->value; |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | public function getItem(): CacheItem |
|
| 40 | } |
||
| 41 | } |
||
| 42 |