@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | ->setMaxResults(10) |
27 | 27 | ->getResult(); |
28 | 28 | |
29 | - foreach ($hallOfFame as &$data){ |
|
29 | + foreach ($hallOfFame as &$data) { |
|
30 | 30 | $data['liters'] = round($data['liters'], 2); |
31 | 31 | } |
32 | 32 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ') |
47 | 47 | ->getArrayResult(); |
48 | 48 | |
49 | - foreach ($promoBalances as &$promoBalance){ |
|
49 | + foreach ($promoBalances as &$promoBalance) { |
|
50 | 50 | $promoBalance['promoBalance'] = round($promoBalance['promoBalance'], 2); |
51 | 51 | } |
52 | 52 |
@@ -7,8 +7,8 @@ |
||
7 | 7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
8 | 8 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
9 | 9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
10 | -use Symfony\Component\Form\Exception\UnexpectedTypeException; |
|
11 | 10 | use Symfony\Component\DependencyInjection\ContainerInterface; |
11 | +use Symfony\Component\Form\Exception\UnexpectedTypeException; |
|
12 | 12 | use Symfony\Component\HttpFoundation\Request; |
13 | 13 | use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; |
14 | 14 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
@@ -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 = $this->getConfig('promos.assos'); |
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); |