Completed
Push — master ( 93b50d...02fb34 )
by Dominik
10:08 queued 03:07
created

AzineEmailUpdateConfirmationTwigSwiftMailer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 22
c 0
b 0
f 0
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A sendUpdateEmailConfirmation() 0 10 1
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