| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public static function get(array $setting): MessengerInterface |
||
| 32 | { |
||
| 33 | $sender = $setting['config']['sender'] ?? ''; |
||
| 34 | $recipients = $setting['config']['recipients'] ?? []; |
||
| 35 | |||
| 36 | $instance = new Mail(); |
||
| 37 | $instance->setSubject(__('core', 'messenger_text_mail_subject')); |
||
| 38 | $instance->addSender($sender); |
||
| 39 | |||
| 40 | foreach ($recipients as $recipient) { |
||
| 41 | $instance->addRecipient($recipient); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $instance; |
||
| 45 | } |
||
| 46 | } |