@@ -70,7 +70,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -22,14 +22,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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); |