Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3.0175 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 5 | public function create(AbstractUser $user, array $context = []): ?RawMessage |
|
25 | { |
||
26 | 5 | if (!$this->enabled) { |
|
27 | return null; |
||
28 | } |
||
29 | |||
30 | 5 | $this->initUser($user); |
|
31 | |||
32 | 5 | $token = $user->getNewEmailVerificationToken(); |
|
33 | 5 | if ($token) { |
|
34 | 1 | $context['redirect_url'] = $this->getTokenUrl($token, $user->getUsername()); |
|
|
|||
35 | } |
||
36 | |||
37 | 5 | return $this->createEmailMessage($context); |
|
38 | } |
||
45 |