@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | // Si on est l'auteur du shotgun, on peut récupérer la liste d'attente |
| 376 | 376 | if ($event->getAuthorUser() == $user) { |
| 377 | 377 | // It's a trap |
| 378 | - if (time() >= $event->getShotgunDate()){ |
|
| 378 | + if (time() >= $event->getShotgunDate()) { |
|
| 379 | 379 | $result['success'] = $success; |
| 380 | 380 | $result['fail'] = $fail; |
| 381 | 381 | } else { |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | } |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | - if ($this->is('ADMIN')){ |
|
| 387 | + if ($this->is('ADMIN')) { |
|
| 388 | 388 | $result['success'] = $success; |
| 389 | 389 | $result['fail'] = $fail; |
| 390 | 390 | } |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $promoBalances = $this->manager->getRepository('KIFoyerBundle:Transaction')->getPromoBalances(); |
| 50 | 50 | |
| 51 | - foreach ($promoBalances as $promoBalance){ |
|
| 51 | + foreach ($promoBalances as $promoBalance) { |
|
| 52 | 52 | $statistics['promoBalances']['labels'][] = trim($promoBalance['promo']); |
| 53 | 53 | $statistics['promoBalances']['data'][] = round($promoBalance['promoBalance'], 2); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | $soldBeers = $this->manager->getRepository('KIFoyerBundle:Transaction')->getSoldBeers(); |
| 57 | 57 | |
| 58 | - foreach ($soldBeers as $soldBeer){ |
|
| 58 | + foreach ($soldBeers as $soldBeer) { |
|
| 59 | 59 | $statistics['soldBeers']['labels'][] = trim($soldBeer['name']); |
| 60 | 60 | $statistics['soldBeers']['data'][] = $soldBeer['soldBeer']; |
| 61 | 61 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $this->trust($this->isFoyerMember()); |
| 137 | 137 | |
| 138 | - $response = new StreamedResponse(function () { |
|
| 138 | + $response = new StreamedResponse(function() { |
|
| 139 | 139 | $results = $this->repository->getDebtsIterator(); |
| 140 | 140 | $handle = fopen('php://output', 'r+'); |
| 141 | 141 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | { |
| 173 | 173 | $this->trust($this->isFoyerMember()); |
| 174 | 174 | |
| 175 | - $response = new StreamedResponse(function () { |
|
| 175 | + $response = new StreamedResponse(function() { |
|
| 176 | 176 | $results = $this->repository->getPromoBalance(); |
| 177 | 177 | $handle = fopen('php://output', 'r+'); |
| 178 | 178 | |
@@ -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); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | ->setReplyTo([$from->getEmail() => $from->getFirstName().' '.$from->getLastName()]) |
| 28 | 28 | ; |
| 29 | 29 | |
| 30 | - foreach($attachments as $attachment){ |
|
| 30 | + foreach ($attachments as $attachment) { |
|
| 31 | 31 | $message->attach(Swift_Attachment::fromPath($attachment['path'])->setFilename($attachment['name'])); |
| 32 | 32 | } |
| 33 | 33 | |