Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
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 MessageEncoding(); |
||
24 | if (isset($config['mt_mail']['message_encoding'])) { |
||
25 | $plugin->setEncoding($config['mt_mail']['message_encoding']); |
||
26 | } |
||
27 | |||
28 | return $plugin; |
||
29 | } |
||
30 | } |
||
31 |