@@ -96,7 +96,7 @@ |
||
96 | 96 | ); |
97 | 97 | |
98 | 98 | if ($mailSent) { |
99 | - $this->addFlash(FlashMessageCategory::SUCCESS, "A validation mail has been sent to " . $user->getEmail()); |
|
99 | + $this->addFlash(FlashMessageCategory::SUCCESS, "A validation mail has been sent to ".$user->getEmail()); |
|
100 | 100 | return; |
101 | 101 | } |
102 | 102 |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace App\FlashMessage; |
4 | 4 | |
5 | -class FlashMessageCategory{ |
|
5 | +class FlashMessageCategory { |
|
6 | 6 | //'alert', 'success', 'error', 'warning', 'info' |
7 | 7 | const SUCCESS = 'success'; |
8 | 8 | const ALERT = 'alert'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | public function send(string $subject, string $template, $mailData, string $to, String $from = null):bool |
26 | 26 | { |
27 | - if ($from === null){ |
|
27 | + if ($from === null) { |
|
28 | 28 | $from = getenv('ADMIN_EMAIL'); |
29 | 29 | } |
30 | 30 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ), |
39 | 39 | 'text/html' |
40 | 40 | ); |
41 | - return $this->mailer->send($message)>0; |
|
41 | + return $this->mailer->send($message) > 0; |
|
42 | 42 | |
43 | 43 | } |
44 | 44 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $this->retrieveUserFromToken($token); |
46 | 46 | |
47 | - if($this->isUserVerified()){ |
|
47 | + if ($this->isUserVerified()) { |
|
48 | 48 | $this->addFlash(FlashMessageCategory::ERROR, 'Mail already verified'); |
49 | 49 | throw new RedirectException($this->urlGenerator->generate('app_login')); |
50 | 50 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function doesResetpasswordTokenValidateEmail(string $token):bool |
63 | 63 | { |
64 | 64 | $this->retrieveUserFromToken($token); |
65 | - if(!$this->isUserVerifiedDateTime()){ |
|
65 | + if (!$this->isUserVerifiedDateTime()) { |
|
66 | 66 | $this->addFlash(FlashMessageCategory::ERROR, 'Token is too old, please use this form to resend a link'); |
67 | 67 | throw new RedirectException($this->urlGenerator->generate('app_forgotpassword')); |
68 | 68 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | private function isUserVerifiedDateTime():bool |
97 | 97 | { |
98 | - if($this->user){ |
|
98 | + if ($this->user) { |
|
99 | 99 | return $this->user->isVerifiedDateTimeValid(); |
100 | 100 | } |
101 | 101 | return false; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | private function isUserVerified():bool |
110 | 110 | { |
111 | - if($this->user){ |
|
111 | + if ($this->user) { |
|
112 | 112 | return $this->user->getVerified(); |
113 | 113 | } |
114 | 114 | return false; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; |
6 | 6 | |
7 | -trait AddFlashTrait{ |
|
7 | +trait AddFlashTrait { |
|
8 | 8 | |
9 | 9 | private $flashBag; |
10 | 10 |