Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 1 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
20 | { |
||
21 | 1 | $config = $serviceLocator->get('config')['mxdimodule']; |
|
22 | |||
23 | 1 | $cache = StorageFactory::adapterFactory( |
|
24 | 1 | $config['cache_adapter'], |
|
25 | 1 | $config['cache_options'] |
|
26 | 1 | ); |
|
27 | |||
28 | 1 | if ($cache instanceof AbstractAdapter) { |
|
29 | 1 | $cache->addPlugin(new Serializer()); |
|
30 | 1 | } |
|
31 | |||
32 | 1 | return $cache; |
|
33 | } |
||
34 | } |
||
35 |