| Conditions | 2 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function register(DiInterface $container) |
||
| 23 | { |
||
| 24 | $config = $container->get('config'); |
||
| 25 | |||
| 26 | $container->setShared( |
||
| 27 | 'modelsCache', |
||
| 28 | function () use ($config) { |
||
| 29 | if (strtolower($config->app->env) != Flags::PRODUCTION) { |
||
| 30 | $frontCache = new None(); |
||
| 31 | $cache = new Memory($frontCache); |
||
| 32 | } else { |
||
| 33 | $frontCache = new Data([ |
||
| 34 | 'lifetime' => envValue('MODELS_CACHE_LIFETIME', 86400), |
||
| 35 | ]); |
||
| 36 | |||
| 37 | $cache = new Redis( |
||
| 38 | $frontCache, |
||
| 39 | [ |
||
| 40 | 'host' => envValue('REDIS_HOST', '127.0.0.1'), |
||
| 41 | 'port' => envValue('REDIS_PORT', 6379), |
||
| 42 | 'prefix' => 'modelsCache', |
||
| 43 | ] |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | |||
| 47 | return $cache; |
||
| 48 | } |
||
| 52 |
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