1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of the Micro framework package. |
||
7 | * |
||
8 | * (c) Stanislau Komar <[email protected]> |
||
9 | * |
||
10 | * For the full copyright and license information, please view the LICENSE |
||
11 | * file that was distributed with this source code. |
||
12 | */ |
||
13 | |||
14 | namespace Micro\Plugin\Cache\Facade; |
||
15 | |||
16 | use Micro\Plugin\Cache\Business\Pool\CachePoolFactoryInterface; |
||
17 | use Micro\Plugin\Cache\Business\Pool\CachePoolInterface; |
||
18 | use Psr\Cache\CacheItemPoolInterface; |
||
19 | use Symfony\Component\Cache\Adapter\AbstractAdapter; |
||
0 ignored issues
–
show
|
|||
20 | |||
21 | class CacheFacade implements CacheFacadeInterface |
||
22 | { |
||
23 | private CachePoolInterface|null $cachePool; |
||
24 | |||
25 | 5 | public function __construct( |
|
26 | private readonly CachePoolFactoryInterface $cachePoolFactory |
||
27 | ) { |
||
28 | 5 | $this->cachePool = null; |
|
29 | } |
||
30 | |||
31 | 4 | public function getCachePsr6(string $cachePoolName): CacheItemPoolInterface |
|
32 | { |
||
33 | 4 | return $this->getCachePool()->getCachePsr6($cachePoolName); |
|
34 | } |
||
35 | |||
36 | 5 | public function getCachePsr16(string $cachePoolName): CacheItemPoolInterface |
|
37 | { |
||
38 | 5 | return $this->getCachePool()->getCachePsr16($cachePoolName); |
|
39 | } |
||
40 | |||
41 | 4 | public function getCacheSymfony(string $cachePoolName): AbstractAdapter |
|
42 | { |
||
43 | 4 | return $this->getCachePool()->getCacheSymfony($cachePoolName); |
|
44 | } |
||
45 | |||
46 | 5 | protected function getCachePool(): CachePoolInterface |
|
47 | { |
||
48 | 5 | if ($this->cachePool) { |
|
49 | 5 | return $this->cachePool; |
|
50 | } |
||
51 | |||
52 | 5 | $this->cachePool = $this->cachePoolFactory->create(); |
|
53 | |||
54 | 5 | return $this->cachePool; |
|
55 | } |
||
56 | } |
||
57 |
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