| Conditions | 3 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 5.1971 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function send($toEmail, $toName, $subject, $view, array $data = array(), $options = null) |
||
| 39 | { |
||
| 40 | 1 | $this->mail->queue($view, $data, function ($message) use ($toEmail, $toName, $subject, $options) { |
|
| 41 | |||
| 42 | $message->to($toEmail, $toName) |
||
| 43 | ->subject($subject); |
||
| 44 | |||
| 45 | // Allow the caller to run additional functions |
||
| 46 | // on the $msg SwiftMailer object (cc, bcc, attach, ...) |
||
| 47 | if ($options && is_callable($options)) { |
||
| 48 | call_user_func($options, $message); |
||
| 49 | } |
||
| 50 | 1 | }); |
|
| 51 | 1 | } |
|
| 52 | } |
||
| 53 |