Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | 3 | public function __invoke(ContainerInterface $serviceLocator) |
|
18 | { |
||
19 | 3 | if (!method_exists($serviceLocator, 'configure')) { |
|
20 | 3 | $serviceLocator = $serviceLocator->getServiceLocator(); |
|
21 | 3 | } |
|
22 | 3 | $config = $serviceLocator->get('Configuration'); |
|
23 | 3 | $plugin = new Layout(); |
|
24 | 3 | if (isset($config['mt_mail']['layout'])) { |
|
25 | 1 | $plugin->setLayoutTemplate($config['mt_mail']['layout']); |
|
26 | 1 | } |
|
27 | |||
28 | 3 | return $plugin; |
|
29 | } |
||
30 | } |
||
31 |