| Total Complexity | 6 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait HasCacheStoreTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param $adapter |
||
| 16 | * @param $config |
||
| 17 | */ |
||
| 18 | protected function checkForCacheNeeded(&$adapter, &$config) |
||
| 19 | { |
||
| 20 | $cache = Arr::pull($config, 'cache'); |
||
| 21 | if (!empty($cache)) { |
||
| 22 | $adapter = $this->createCacheAdapter($adapter, $cache); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param $adapter |
||
| 28 | * @param $cache |
||
| 29 | * @return CachedAdapter |
||
| 30 | */ |
||
| 31 | protected function createCacheAdapter($adapter, $cache) |
||
| 34 | } |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Create a cache store instance. |
||
| 39 | * |
||
| 40 | * @param mixed $config |
||
| 41 | * @return \League\Flysystem\Cached\CacheInterface|MemoryStore|Cache |
||
| 42 | * |
||
| 43 | * @throws \InvalidArgumentException |
||
| 44 | */ |
||
| 45 | protected function createCacheStore($config) |
||
| 46 | { |
||
| 47 | if ($config === true) { |
||
| 48 | return new MemoryStore; |
||
| 49 | } |
||
| 50 | |||
| 51 | $cacheManager = $this->getCacheManager(); |
||
| 52 | |||
| 53 | return new Cache( |
||
| 54 | $cacheManager->store($config['store']), |
||
| 55 | $config['prefix'] ?? 'flysystem', |
||
| 56 | $config['expire'] ?? null |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return mixed |
||
| 62 | */ |
||
| 63 | protected function getCacheManager() |
||
| 66 | } |
||
| 67 | } |
||
| 68 |
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