| Total Complexity | 7 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | trait CacheAdapterTrait |
||
| 14 | { |
||
| 15 | |||
| 16 | /** @var CacheAdapterInterface $cacheAdapter */ |
||
| 17 | protected $cacheAdapter; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return CacheAdapterInterface |
||
| 21 | */ |
||
| 22 | public function getCacheAdapter(): CacheAdapterInterface |
||
| 23 | { |
||
| 24 | return $this->cacheAdapter; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param CacheAdapterInterface $cacheAdapter |
||
| 29 | */ |
||
| 30 | public function setCacheAdapter(CacheAdapterInterface $cacheAdapter): void |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $cacheKey |
||
| 37 | * @param \Closure $closure |
||
| 38 | * @param array $tags |
||
| 39 | * @param null $expiresAfter |
||
|
|
|||
| 40 | * @return mixed|null |
||
| 41 | * @throws \Psr\Cache\CacheException |
||
| 42 | * @throws \Psr\Cache\InvalidArgumentException |
||
| 43 | */ |
||
| 44 | public function getCacheDataOrAdd(string $cacheKey, \Closure $closure, array $tags = [], $expiresAfter = null) |
||
| 67 |