| Total Complexity | 7 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class DoctrineCacheAdapter implements CacheInterface, ClearableCacheInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $prefix; |
||
| 20 | /** |
||
| 21 | * @var Cache |
||
| 22 | */ |
||
| 23 | private $cache; |
||
| 24 | 2 | ||
| 25 | public function __construct(string $prefix, Cache $cache) |
||
| 29 | } |
||
| 30 | 2 | ||
| 31 | public function load(string $class): ?ClassMetadata |
||
| 32 | 2 | { |
|
| 33 | $cache = $this->cache->fetch($this->prefix . $class); |
||
| 34 | 2 | ||
| 35 | return false === $cache ? null : $cache; |
||
| 36 | } |
||
| 37 | 2 | ||
| 38 | public function put(ClassMetadata $metadata): void |
||
| 41 | } |
||
| 42 | 2 | ||
| 43 | public function evict(string $class): void |
||
| 46 | } |
||
| 47 | |||
| 48 | public function clear(): bool |
||
| 55 | } |
||
| 56 | } |
||
| 57 |