Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 2 | public function __invoke(ContainerInterface $container, array $options): IlluminateCachePool |
|
15 | { |
||
16 | 2 | $cacheStoreName = (string)($options['store'] ?? ''); |
|
17 | |||
18 | 2 | $cacheStore = $container->get($cacheStoreName); |
|
19 | |||
20 | 2 | if (!$cacheStore instanceof Store) { |
|
21 | 1 | throw new InvalidConfigException( |
|
22 | 1 | 'Service provided for the Illuminate Cache must be an instance of ' . Store::class |
|
23 | ); |
||
24 | } |
||
25 | |||
26 | 1 | return new IlluminateCachePool($cacheStore); |
|
27 | } |
||
29 |