| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | 1 | public function sendNotification($email, $title = 'Hello!', $content = ' ', $user = null) |
|
| 26 | { |
||
| 27 | 1 | $message = new \Swift_Message(); |
|
| 28 | $message |
||
| 29 | 1 | ->setSubject('Hello Email') |
|
| 30 | 1 | ->setFrom($this->from) |
|
| 31 | 1 | ->setTo($email) |
|
| 32 | 1 | ->setBody($this->twig->render('AppBundle:Email:email.html.twig', [ |
|
| 33 | 1 | 'title' => $title, 'content' => $content, 'user' => $user, ]), 'text/html'); |
|
| 34 | 1 | $this->mailer->send($message); |
|
| 35 | 1 | } |
|
| 36 | } |
||
| 37 |