Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 3 | public function create(AbstractUser $user, array $context = []): ?RawMessage |
|
27 | { |
||
28 | 3 | if (!$this->enabled) { |
|
29 | 1 | return null; |
|
30 | } |
||
31 | |||
32 | 2 | $this->initUser($user); |
|
33 | |||
34 | 2 | $token = $user->plainEmailAddressVerifyToken; |
|
35 | 2 | $user->plainEmailAddressVerifyToken = null; |
|
36 | 2 | if ($token) { |
|
37 | 1 | $context['redirect_url'] = $this->getTokenUrl($token, $user->getUsername()); |
|
|
|||
38 | } |
||
39 | |||
40 | 2 | return $this->createEmailMessage($context); |
|
41 | } |
||
48 |