| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 22 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
| 23 | { |
||
| 24 | |||
| 25 | $config = $serviceLocator->get('Config'); |
||
| 26 | $mails = isset($config['mails']) ? $config['mails'] : []; |
||
| 27 | |||
| 28 | /* @var \Auth\Options\ModuleOptions $authOptions */ |
||
| 29 | $authOptions = $serviceLocator->get('Auth\Options'); |
||
| 30 | $configArray=[ |
||
| 31 | 'from' => [ |
||
| 32 | 'name' => $authOptions->getFromName(), |
||
| 33 | 'email' => $authOptions->getFromEmail() |
||
| 34 | ], |
||
| 35 | ]; |
||
| 36 | |||
| 37 | $configArray += $mails; |
||
| 38 | |||
| 39 | $config = new MailServiceConfig($configArray); |
||
| 40 | |||
| 41 | $service = new MailService($config); |
||
| 42 | |||
| 43 | return $service; |
||
| 44 | |||
| 45 | } |
||
| 46 | } |
||
| 47 |