Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 2 | public function __invoke(ContainerInterface $container, array $options): DoctrineCachePool |
|
36 | { |
||
37 | 2 | if (empty($options['service'])) { |
|
38 | 1 | throw new InvalidConfigException( |
|
39 | 1 | 'You must provide a doctrine cache service name to use' |
|
40 | ); |
||
41 | } |
||
42 | |||
43 | 1 | $cache = $container->get($options['service']); |
|
44 | 1 | return new DoctrineCachePool($cache); |
|
45 | } |
||
47 |