| Conditions | 3 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function createMessage($email, $template, array $data) |
||
| 42 | { |
||
| 43 | $masterRequest = $this->requestStack->getMasterRequest(); |
||
| 44 | |||
| 45 | if (!empty($masterRequest)) { |
||
| 46 | $data['request'] = $masterRequest; |
||
| 47 | } |
||
| 48 | |||
| 49 | $templateContext = $this->twig->mergeGlobals($data); |
||
| 50 | |||
| 51 | /** @var \Twig_Template $template */ |
||
| 52 | $template = $this->twig->loadTemplate($template); |
||
| 53 | $subject = $template->renderBlock('subject', $templateContext); |
||
| 54 | $htmlBody = $template->renderBlock('body_html', $templateContext); |
||
| 55 | $message = \Swift_Message::newInstance() |
||
|
|
|||
| 56 | ->setSubject($subject) |
||
| 57 | ->setTo($email); |
||
| 58 | |||
| 59 | if (!empty($htmlBody)) { |
||
| 60 | $message->setBody($htmlBody, 'text/html'); |
||
| 61 | } |
||
| 62 | |||
| 63 | return $message; |
||
| 64 | } |
||
| 65 | } |
||
| 66 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.