| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 2 | public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): Cache\Cache |
|
| 16 | { |
||
| 17 | // TODO Make use of the redis cache via RedisFactory when possible |
||
| 18 | |||
| 19 | 2 | $appOptions = $container->get(AppOptions::class); |
|
| 20 | 2 | $adapter = env('APP_ENV', 'pro') === 'pro' ? new Cache\ApcuCache() : new Cache\ArrayCache(); |
|
| 21 | 2 | $adapter->setNamespace((string) $appOptions); |
|
| 22 | |||
| 23 | 2 | return $adapter; |
|
| 24 | } |
||
| 26 |