Completed
Branch v1.x-dev (6fcd50)
by Benjamin
04:47
created
src/Command/RevokeCoachCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 
25 25
         $this->io->title('Revoke an OBBLM Administrator');
26 26
         $this->io->caution('Be carefull, this new user will not have anymore the highest right on the application');
27
-        if($this->confirmContinue()) {
27
+        if ($this->confirmContinue()) {
28 28
 
29 29
             $coach = $this->getCoachByLoginOrEmail();
30 30
 
31 31
             $continue = $this->io->confirm("Are you sure you want to revoke {$coach->getUsername()} ?", true);
32
-            if($continue) {
33
-                if(in_array(Roles::ADMIN, $coach->getRoles())) {
32
+            if ($continue) {
33
+                if (in_array(Roles::ADMIN, $coach->getRoles())) {
34 34
                     $coach
35 35
                         ->setRoles([Roles::COACH]);
36 36
                     $this->saveCoach($coach);
Please login to merge, or discard this patch.
src/Command/CreateAdminCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $this->io->title('Create a new OBBLM Administrator');
23 23
         $this->io->caution('Be carefull, this new user will have the highest right on the application');
24 24
 
25
-        if($this->confirmContinue()) {
25
+        if ($this->confirmContinue()) {
26 26
 
27 27
             $this->io->section('User informations');
28 28
             $username = $this->askUsername();
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 ->setLocale('en')
39 39
                 ->setRoles([Roles::ADMIN])
40 40
                 ;
41
-            if(!$active) {
41
+            if (!$active) {
42 42
                 $coach
43 43
                     ->setHash(hash('sha256', $coach->getEmail()));
44 44
                 $registration = new RegisterCoachEvent($coach);
Please login to merge, or discard this patch.
src/Validator/Constraints/EntityExists.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,6 +13,6 @@
 block discarded – undo
13 13
 
14 14
     public function validatedBy()
15 15
     {
16
-        return get_class($this).'Validator';
16
+        return get_class($this) . 'Validator';
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Controller/FrontendController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function localeSwitch(Request $request)
32 32
     {
33
-        if($request->headers->get('referer'))
33
+        if ($request->headers->get('referer'))
34 34
         {
35 35
             return $this->redirect($request->headers->get('referer'));
36 36
         }
Please login to merge, or discard this patch.
src/Controller/SecurityController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,13 +138,13 @@  discard block
 block discarded – undo
138 138
 
139 139
         $form->handleRequest($request);
140 140
 
141
-        if($form->isSubmitted() && $form->isValid())
141
+        if ($form->isSubmitted() && $form->isValid())
142 142
         {
143 143
             $data = $form->getData();
144 144
             $em = $this->getDoctrine()->getManager();
145 145
             /** @var Coach $coach */
146 146
             $coach = $em->getRepository(Coach::class)->findOneByEmail($data['email']);
147
-            if($coach) {
147
+            if ($coach) {
148 148
                 $coach
149 149
                     ->setResetPasswordAt(new \DateTime())
150 150
                     ->setResetPasswordHash($this->getHashFor(random_bytes(10)));
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         /** @var Coach $coach */
177 177
         $coach = $em->getRepository(Coach::class)->findOneForPasswordReset($hash);
178 178
 
179
-        if($coach) {
179
+        if ($coach) {
180 180
             $form = $this->createForm(PasswordConfirmType::class);
181 181
 
182 182
             $form->handleRequest($request);
Please login to merge, or discard this patch.