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