| Total Complexity | 10 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class InMemoryClient implements CacheItemPoolInterface |
||
| 11 | { |
||
| 12 | private array $items; |
||
| 13 | |||
| 14 | public function getItem(string $key): CacheItemInterface |
||
| 15 | { |
||
| 16 | return new CacheItem($key, $this->items[$key]); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getItems(array $keys = []): array |
||
| 20 | { |
||
| 21 | return array_map(static fn (string $key): CacheItemInterface => $this->getItem($key), $keys); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function hasItem(string $key): bool |
||
| 25 | { |
||
| 26 | return $this->getItem($key)->isHit(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function clear(): bool |
||
| 30 | { |
||
| 31 | $this->items = []; |
||
| 32 | |||
| 33 | return true; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function deleteItem(string $key): bool |
||
| 37 | { |
||
| 38 | if (in_array($key, $this->items, true)) { |
||
| 39 | unset($this->items[$key]); |
||
| 40 | } |
||
| 41 | |||
| 42 | return true; |
||
| 43 | } |
||
| 44 | |||
| 45 | public function deleteItems(array $keys): bool |
||
| 46 | { |
||
| 47 | array_map(static fn (string $key): bool => $this->deleteItem($key), $keys); |
||
| 48 | |||
| 49 | return true; |
||
| 50 | } |
||
| 51 | |||
| 52 | public function save(CacheItemInterface $item): bool |
||
| 53 | { |
||
| 54 | $this->items[$item->getKey()] = $item->get(); |
||
| 55 | |||
| 56 | return true; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function saveDeferred(CacheItemInterface $item): bool |
||
| 60 | { |
||
| 61 | return $this->save($item); |
||
| 62 | } |
||
| 63 | |||
| 64 | public function commit(): bool |
||
| 67 | } |
||
| 68 | } |
||
| 69 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths