Completed
Push — master ( df97fa...726db7 )
by Louis
51:58
created
back/src/KI/UserBundle/Security/SsoEnpcLoginAuthenticator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $username = $credentials['username'];
71 71
 
72 72
         $email = $credentials['mail'];
73
-        if(!preg_match('/@eleves\.enpc\.fr$/', $email))
73
+        if (!preg_match('/@eleves\.enpc\.fr$/', $email))
74 74
             throw new AccessDeniedException();
75 75
 
76 76
         $user = null;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         }
83 83
 
84
-        if(!$user) {
84
+        if (!$user) {
85 85
             $user = $this->userRepository->findOneBy(['email' => $credentials['mail']]);
86 86
         }
87 87
 
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Controller/PontlyvalentsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
         $this->initialize('Pontlyvalent', 'User');
23 23
     }
24 24
 
25
-    private function checkPontlyvalentOpen(){
25
+    private function checkPontlyvalentOpen() {
26 26
         $lastPromo = $this->getConfig('promos.latest');
27 27
 
28 28
         if ($this->user->getPromo() == $lastPromo) {
29
-            throw new BadRequestHttpException('Ton tour n\'est pas encore arrivé, petit ' . $lastPromo . ' !');
29
+            throw new BadRequestHttpException('Ton tour n\'est pas encore arrivé, petit '.$lastPromo.' !');
30 30
         }
31 31
 
32
-        if($this->getConfig('pontlyvalent.open')) {
32
+        if ($this->getConfig('pontlyvalent.open')) {
33 33
             throw new BadRequestHttpException('Le pontlyvalent est fermé !');
34 34
         }
35 35
     }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
         $pontlyvalent = $this->repository->getPontlyvalent($target, $this->user);
90 90
 
91
-        if(count($pontlyvalent) != 1)
91
+        if (count($pontlyvalent) != 1)
92 92
             throw new NotFoundHttpException();
93 93
 
94 94
         return $this->json($pontlyvalent[0]);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         $targetPromo = array_slice($this->getConfig('promos.all'), -2, 1)[0];
123 123
         if ($target->getPromo() != $targetPromo) {
124
-            throw new BadRequestHttpException('Ce n\'est pas un ' . $targetPromo . ' !');
124
+            throw new BadRequestHttpException('Ce n\'est pas un '.$targetPromo.' !');
125 125
         }
126 126
 
127 127
         $pontlyvalent = $this->repository->getPontlyvalent($target, $this->user);
Please login to merge, or discard this patch.