Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class Psr6Store implements StoreInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var CacheItemPoolInterface |
||
16 | */ |
||
17 | private $cache; |
||
18 | |||
19 | 15 | public function __construct(CacheItemPoolInterface $cache) |
|
20 | { |
||
21 | 15 | $this->cache = $cache; |
|
22 | 15 | } |
|
23 | |||
24 | 6 | public function has(ServerRequestInterface $request): bool |
|
25 | { |
||
26 | 6 | $key = $this->getCacheKey($request); |
|
27 | 6 | $item = $this->cache->getItem($key); |
|
28 | 6 | return $item->isHit(); |
|
29 | } |
||
30 | |||
31 | 6 | public function get(ServerRequestInterface $request): ?string |
|
32 | { |
||
33 | 6 | $key = $this->getCacheKey($request); |
|
34 | 6 | $item = $this->cache->getItem($key); |
|
35 | 6 | if ($item->isHit()) { |
|
36 | 3 | return $item->get(); |
|
37 | } |
||
38 | 3 | return null; |
|
39 | } |
||
40 | |||
41 | 3 | public function put(ServerRequestInterface $request, ResponseInterface $response): void |
|
47 | 3 | } |
|
48 | |||
49 | 15 | private function getCacheKey(ServerRequestInterface $request): string |
|
56 | } |
||
57 | } |
||
58 |
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