Completed
Push — master ( 096baa...85634b )
by Louis
26s queued 13s
created
back/src/KI/PublicationBundle/Service/CalendarService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
             ;
63 63
         }
64 64
 
65
-        foreach ($courses as $course){
65
+        foreach ($courses as $course) {
66 66
             $event = $cal->newEvent();
67 67
             $name = $course->getCourse()->getName();
68 68
             if ($course->getGroup() !== 0)
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Service/MailerService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             ->setReplyTo(array($from->getEmail() => $from->getFirstName().' '.$from->getLastName()))
29 29
         ;
30 30
 
31
-        foreach($attachments as $attachment){
31
+        foreach ($attachments as $attachment) {
32 32
             $message->attach(Swift_Attachment::fromPath($attachment["path"])->setFilename($attachment["name"]));
33 33
         }
34 34
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             ->setReplyTo(array('[email protected]' => 'Ras\'Ponts\'ine BDE des Ponts'))
51 51
         ;
52 52
 
53
-        foreach($attachments as $attachment){
53
+        foreach ($attachments as $attachment) {
54 54
             $message->attach(Swift_Attachment::fromPath($attachment["path"])->setFilename($attachment["name"]));
55 55
         }
56 56
 
Please login to merge, or discard this patch.
back/src/KI/CoreBundle/Service/VersionService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         return array(
28
-            'version' => $out[1][count($out[0])-1],
29
-            'major'   => $out[2][count($out[0])-1],
30
-            'minor'   => $out[3][count($out[0])-1],
28
+            'version' => $out[1][count($out[0]) - 1],
29
+            'major'   => $out[2][count($out[0]) - 1],
30
+            'minor'   => $out[3][count($out[0]) - 1],
31 31
             'build'   => shell_exec('git log --pretty=format:"%h" -n 1'),
32 32
             'date'    => (int)shell_exec('git log -1 --pretty=format:%ct')
33 33
         );
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Controller/OwnController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
         array_multisort($ids, SORT_ASC, $locked);
144 144
 
145 145
         // On renvoie pas mal de données utiles
146
-        $response = Achievement::getLevel($factor * $points);
146
+        $response = Achievement::getLevel($factor*$points);
147 147
         $return = array(
148 148
             'number' => $response['number'],
149
-            'points' => ceil($factor * $points),
149
+            'points' => ceil($factor*$points),
150 150
             'current_level' => $response['current'],
151 151
             'next_level' => isset($response['next']) ? $response['next'] : null,
152 152
             'unlocked' => $unlocked,
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                 if (!$notification->getRead()->contains($user) && !$notification->getRecipient()->contains($user))
300 300
                     $return[] = $notification;
301 301
             } else
302
-                throw new \Exception('Notification : mode d\'envoi inconnu (' . $mode . ')');
302
+                throw new \Exception('Notification : mode d\'envoi inconnu ('.$mode.')');
303 303
         }
304 304
 
305 305
         // On marque chaque notification récupérée comme lue
Please login to merge, or discard this patch.
back/src/KI/PonthubBundle/Helper/FilelistHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
         if (!(isset($match[1]) && isset($match[2]))) {
108 108
             return array();
109 109
         }
110
-        $size = $match[2] * 1000;
110
+        $size = $match[2]*1000;
111 111
         $line = str_replace($match[1], '', $line);
112 112
 
113 113
         // On exclut tous les fichiers de type non valide
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Command/FacegameAchievementsCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,23 +47,23 @@
 block discarded – undo
47 47
             $wrongAnswers = $facegame->getWrongAnswers();
48 48
             $duration = $facegame->getDuration();
49 49
 
50
-            if ($wrongAnswers == 0 && $promoGame == $promoUser - 1 && $duration < 60 * 1000) {
50
+            if ($wrongAnswers == 0 && $promoGame == $promoUser - 1 && $duration < 60*1000) {
51 51
 
52 52
                 $achievementCheck = new AchievementCheckEvent(Achievement::GAME_BEFORE, $user);
53 53
                 $dispatcher->dispatch('upont.achievement', $achievementCheck);
54 54
 
55
-            } else if ($wrongAnswers == 0 && $promoGame == $promoUser && $duration < 60 * 1000) {
55
+            } else if ($wrongAnswers == 0 && $promoGame == $promoUser && $duration < 60*1000) {
56 56
 
57 57
                 $achievementCheck = new AchievementCheckEvent(Achievement::GAME_SELF, $user);
58 58
                 $dispatcher->dispatch('upont.achievement', $achievementCheck);
59 59
 
60
-            } else if ($wrongAnswers == 0 && $promoGame == $promoUser + 1 && $duration < 60 * 1000) {
60
+            } else if ($wrongAnswers == 0 && $promoGame == $promoUser + 1 && $duration < 60*1000) {
61 61
 
62 62
                 $achievementCheck = new AchievementCheckEvent(Achievement::GAME_NEXT, $user);
63 63
                 $dispatcher->dispatch('upont.achievement', $achievementCheck);
64 64
 
65 65
             }
66
-            if ($wrongAnswers == 0 && $promoGame < $promoUser && $facegame->getHardcore() && $duration < 60 * 1000) {
66
+            if ($wrongAnswers == 0 && $promoGame < $promoUser && $facegame->getHardcore() && $duration < 60*1000) {
67 67
 
68 68
                 $achievementCheck = new AchievementCheckEvent(Achievement::GAME_OLD, $user);
69 69
                 $dispatcher->dispatch('upont.achievement', $achievementCheck);
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Helper/FacegameHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -142,23 +142,23 @@
 block discarded – undo
142 142
         $promoUser = (int)$this->tokenStorage->getToken()->getUser()->getPromo();
143 143
         $promoGame = (int)$game->getPromo();
144 144
 
145
-        if ($wrongAnswers == 0 && $promoGame == $promoUser - 1 && $duration < 60 * 1000) {
145
+        if ($wrongAnswers == 0 && $promoGame == $promoUser - 1 && $duration < 60*1000) {
146 146
 
147 147
             $achievementCheck = new AchievementCheckEvent(Achievement::GAME_BEFORE);
148 148
             $this->dispatcher->dispatch('upont.achievement', $achievementCheck);
149 149
 
150
-        } else if ($wrongAnswers == 0 && $promoGame == $promoUser && $duration < 60 * 1000) {
150
+        } else if ($wrongAnswers == 0 && $promoGame == $promoUser && $duration < 60*1000) {
151 151
 
152 152
             $achievementCheck = new AchievementCheckEvent(Achievement::GAME_SELF);
153 153
             $this->dispatcher->dispatch('upont.achievement', $achievementCheck);
154 154
 
155
-        } else if ($wrongAnswers == 0 && $promoGame == $promoUser + 1 && $duration < 60 * 1000) {
155
+        } else if ($wrongAnswers == 0 && $promoGame == $promoUser + 1 && $duration < 60*1000) {
156 156
 
157 157
             $achievementCheck = new AchievementCheckEvent(Achievement::GAME_NEXT);
158 158
             $this->dispatcher->dispatch('upont.achievement', $achievementCheck);
159 159
 
160 160
         }
161
-        if ($wrongAnswers == 0 && $promoGame < $promoUser && $game->getHardcore() && $duration < 60 * 1000) {
161
+        if ($wrongAnswers == 0 && $promoGame < $promoUser && $game->getHardcore() && $duration < 60*1000) {
162 162
 
163 163
             $achievementCheck = new AchievementCheckEvent(Achievement::GAME_OLD);
164 164
             $this->dispatcher->dispatch('upont.achievement', $achievementCheck);
Please login to merge, or discard this patch.
back/src/KI/DvpBundle/Controller/BasketOrdersController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $orders = $request->request->get('orders');
99 99
         $isAuthenticated = $this->isGranted('IS_AUTHENTICATED_REMEMBERED');
100 100
 
101
-        if(!$isAuthenticated) {
101
+        if (!$isAuthenticated) {
102 102
             $firstName = $request->request->get('firstName');
103 103
             $lastName = $request->request->get('lastName');
104 104
             $email = $request->request->get('email');
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
                 'dateRetrieve' => $basketDate,
134 134
             ]);
135 135
 
136
-            if($basketDate->isLocked())
136
+            if ($basketDate->isLocked())
137 137
                 continue;
138 138
 
139
-            if($ordered && $basketOrder === null) {
139
+            if ($ordered && $basketOrder === null) {
140 140
                 $basketOrder = new BasketOrder();
141 141
                 $basketOrder->setBasket($basket);
142 142
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
                 $this->manager->persist($basketOrder);
153 153
             }
154 154
 
155
-            if(!$ordered && $basketOrder !== null){
155
+            if (!$ordered && $basketOrder !== null) {
156 156
                 $this->manager->remove($basketOrder);
157 157
             }
158 158
         }
Please login to merge, or discard this patch.
back/src/KI/DvpBundle/Command/SendOrdersCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
6 6
 use Doctrine\ORM\NoResultException;
7
-use KI\DvpBundle\Entity\BasketDate;;
7
+use KI\DvpBundle\Entity\BasketDate; ;
8 8
 use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
9 9
 use Symfony\Component\Console\Input\InputArgument;
10 10
 use Symfony\Component\Console\Input\InputInterface;
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
          */
40 40
         $basketDate = $query->getOneOrNullResult();
41 41
 
42
-        if($basketDate) {
42
+        if ($basketDate) {
43 43
 
44 44
             $orders = $basketDate->getOrders();
45 45
 
46 46
             // Envoi du mail
47 47
             $message = Swift_Message::newInstance()
48
-                ->setSubject('Commandes du ' . $basketDate->getDateRetrieve()->format('l d F Y'))
48
+                ->setSubject('Commandes du '.$basketDate->getDateRetrieve()->format('l d F Y'))
49 49
                 ->setFrom('[email protected]')
50 50
                 ->setTo('[email protected]')
51 51
                 ->setBody($this->getContainer()->get('twig')->render('KIDvpBundle::basket-orders.html.twig', [
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $count = $query->getSingleScalarResult();
74 74
 
75
-        while($count < 4) {
75
+        while ($count < 4) {
76 76
             $prevDate->modify('next thursday');
77 77
 
78 78
             $dateExists = $query = $em->createQuery('SELECT COUNT(date.id) 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 ->setParameter('dateAdding', $prevDate)
82 82
                 ->getSingleScalarResult();
83 83
 
84
-            if($dateExists == 0) {
84
+            if ($dateExists == 0) {
85 85
                 $nextBasketDate = new BasketDate();
86 86
                 $nextBasketDate->setDateRetrieve($prevDate);
87 87
                 $em->persist($nextBasketDate);
Please login to merge, or discard this patch.