sendUpdateEmailConfirmation()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 5
c 0
b 0
f 0
nc 1
nop 3
dl 0
loc 9
rs 10
ccs 0
cts 6
cp 0
crap 2
1
<?php
2
3
namespace Azine\EmailUpdateConfirmationBundle\Mailer;
4
5
use FOS\UserBundle\Mailer\Mailer;
6
use FOS\UserBundle\Model\UserInterface;
7
8
class AzineEmailUpdateConfirmationMailer extends Mailer implements EmailUpdateConfirmationMailerInterface
9
{
10
    /**
11
     * Send confirmation link to specified new user email.
12
     *
13
     * @param UserInterface $user
14
     * @param string        $confirmationUrl
15
     * @param string        $toEmail
16
     */
17
    public function sendUpdateEmailConfirmation(UserInterface $user, $confirmationUrl, $toEmail)
18
    {
19
        $template = $this->parameters['template'];
20
        $rendered = $this->templating->render($template, array(
21
            'user' => $user,
22
            'confirmationUrl' => $confirmationUrl,
23
        ));
24
25
        $this->sendEmailMessage($rendered, $this->parameters['from_email'], $toEmail);
26
    }
27
}
28