Completed
Pull Request — master (#250)
by Louis
92:53 queued 37:37
created
back/src/KI/PublicationBundle/Controller/EventsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
back/src/KI/FoyerBundle/Controller/DefaultController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
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.
back/src/KI/UserBundle/Service/MailerService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.