mingyoung /
dingtalk
| 1 | <?php |
||
| 2 | |||
| 3 | /* |
||
| 4 | * This file is part of the mingyoung/dingtalk. |
||
| 5 | * |
||
| 6 | * (c) 张铭阳 <[email protected]> |
||
| 7 | * |
||
| 8 | * This source file is subject to the MIT license that is bundled |
||
| 9 | * with this source code in the file LICENSE. |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace EasyDingTalk\Kernel\Concerns; |
||
| 13 | |||
| 14 | use Psr\SimpleCache\CacheInterface; |
||
| 15 | use Symfony\Component\Cache\Adapter\FilesystemAdapter; |
||
| 16 | use Symfony\Component\Cache\Psr16Cache; |
||
|
0 ignored issues
–
show
|
|||
| 17 | use Symfony\Component\Cache\Simple\FilesystemCache; |
||
| 18 | |||
| 19 | trait InteractsWithCache |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var \Psr\SimpleCache\CacheInterface |
||
| 23 | */ |
||
| 24 | protected $cache; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return \Psr\SimpleCache\CacheInterface |
||
| 28 | */ |
||
| 29 | public function getCache() |
||
| 30 | { |
||
| 31 | if ($this->cache) { |
||
| 32 | return $this->cache; |
||
| 33 | } |
||
| 34 | |||
| 35 | if (property_exists($this, 'app') && $this->app->offsetExists('cache') && ($this->app['cache'] instanceof CacheInterface)) { |
||
| 36 | return $this->cache = $this->app['cache']; |
||
| 37 | } |
||
| 38 | |||
| 39 | return $this->cache = $this->createDefaultCache(); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return \Psr\SimpleCache\CacheInterface |
||
| 44 | */ |
||
| 45 | protected function createDefaultCache() |
||
| 46 | { |
||
| 47 | if (class_exists(Psr16Cache::class)) { |
||
| 48 | return new Psr16Cache(new FilesystemAdapter('easydingtalk')); |
||
| 49 | } |
||
| 50 | |||
| 51 | return new FilesystemCache('easydingtalk'); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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