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 8
cp 0
crap 2
1
<?php
2
3
namespace Azine\EmailUpdateConfirmationBundle\Mailer;
4
5
use FOS\UserBundle\Mailer\TwigSwiftMailer;
6
use FOS\UserBundle\Model\UserInterface;
7
8
class AzineEmailUpdateConfirmationTwigSwiftMailer extends TwigSwiftMailer implements EmailUpdateConfirmationMailerInterface
9
{
10
    /**
11
     * Send confirmation link to specified new user email.
12
     *
13
     * @param UserInterface $user
14
     * @param $confirmationUrl
15
     * @param $toEmail
16
     *
17
     * @return bool
18
     */
19
    public function sendUpdateEmailConfirmation(UserInterface $user, $confirmationUrl, $toEmail)
20
    {
21
        $template = $this->parameters['template'];
22
        $context = array(
23
            'user' => $user,
24
            'confirmationUrl' => $confirmationUrl,
25
        );
26
27
        $this->sendMessage($template, $context, $this->parameters['from_email'], $toEmail);
28
    }
29
}
30