| Total Complexity | 7 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class PsrCacheAdapter implements CacheInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $prefix; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var CacheItemPoolInterface |
||
| 19 | */ |
||
| 20 | private $pool; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var CacheItemPoolInterface |
||
| 24 | */ |
||
| 25 | private $lastItem; |
||
| 26 | |||
| 27 | public function __construct(string $prefix, CacheItemPoolInterface $pool) |
||
| 28 | { |
||
| 29 | $this->prefix = $prefix; |
||
| 30 | $this->pool = $pool; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritDoc} |
||
| 35 | */ |
||
| 36 | public function load(string $class): ?ClassMetadata |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritDoc} |
||
| 45 | */ |
||
| 46 | public function put(ClassMetadata $metadata): void |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritDoc} |
||
| 59 | */ |
||
| 60 | public function evict(string $class): void |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * If anonymous class is to be cached, it contains invalid path characters that need to be removed/replaced |
||
| 67 | * Example of anonymous class name: class@anonymous\x00/app/src/Controller/DefaultController.php0x7f82a7e026ec |
||
| 68 | * |
||
| 69 | */ |
||
| 70 | private function sanitizeCacheKey(string $key): string |
||
| 75 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..