| Conditions | 4 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function __invoke(ContainerInterface $serviceLocator) |
||
| 18 | { |
||
| 19 | $configuration = $serviceLocator->get('Configuration'); |
||
| 20 | $transportName = $configuration['mt_mail']['transport']; |
||
| 21 | $service = new Sender($serviceLocator->get($transportName)); |
||
| 22 | |||
| 23 | if (isset($configuration['mt_mail']['sender_plugins']) |
||
| 24 | && is_array($configuration['mt_mail']['sender_plugins']) |
||
| 25 | 2 | ) { |
|
| 26 | $pluginManager = $serviceLocator->get('MtMail\Service\SenderPluginManager'); |
||
| 27 | 2 | foreach (array_unique($configuration['mt_mail']['sender_plugins']) as $plugin) { |
|
| 28 | 2 | $service->getEventManager()->attachAggregate($pluginManager->get($plugin)); |
|
|
|
|||
| 29 | 2 | } |
|
| 30 | } |
||
| 31 | 2 | ||
| 32 | 2 | return $service; |
|
| 33 | 2 | } |
|
| 34 | } |
||
| 35 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.