| Total Complexity | 3 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CacheSymfonyFacade implements CacheFacadeInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Jellyfish\CacheSymfony\CacheSymfonyFactory |
||
| 11 | */ |
||
| 12 | protected $factory; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param \Jellyfish\CacheSymfony\CacheSymfonyFactory $factory |
||
| 16 | */ |
||
| 17 | public function __construct(CacheSymfonyFactory $factory) |
||
| 18 | { |
||
| 19 | $this->factory = $factory; |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $key |
||
| 24 | * |
||
| 25 | * @return string|null |
||
| 26 | */ |
||
| 27 | public function get(string $key): ?string |
||
| 28 | { |
||
| 29 | return $this->factory->getCache()->get($key); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $key |
||
| 34 | * @param string $value |
||
| 35 | * @param int|null $lifeTime |
||
| 36 | * |
||
| 37 | * @return \Jellyfish\Cache\CacheFacadeInterface |
||
| 38 | * |
||
| 39 | * @throws \Jellyfish\Cache\Exception\InvalidLifeTimeException |
||
| 40 | */ |
||
| 41 | public function set(string $key, string $value, ?int $lifeTime = null): CacheFacadeInterface |
||
| 46 | } |
||
| 47 | } |
||
| 48 |