@@ -62,7 +62,7 @@ |
||
| 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) |
@@ -47,23 +47,23 @@ |
||
| 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); |
@@ -142,23 +142,23 @@ |
||
| 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); |
@@ -98,7 +98,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | protected function getOne($slug, $auth = false) |
| 38 | 38 | { |
| 39 | 39 | $this->trust(!$this->is('EXTERIEUR') || $auth); |
| 40 | - $item = $this->findBySlug($slug); |
|
| 40 | + $item = $this->findBySlug($slug); |
|
| 41 | 41 | return $item; |
| 42 | 42 | } |
| 43 | 43 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function formData($item, $method, $flush = true) |
| 39 | 39 | { |
| 40 | 40 | // On devine le formulaire à partir du chemin de la classe |
| 41 | - $formName = str_replace('Entity', 'Form', get_class($item)) . 'Type'; |
|
| 41 | + $formName = str_replace('Entity', 'Form', get_class($item)).'Type'; |
|
| 42 | 42 | $form = $this->formFactory->create($formName, $item, ['method' => $method]); |
| 43 | 43 | $form->handleRequest($this->request); |
| 44 | 44 | $code = 400; |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | public function tags() |
| 90 | 90 | { |
| 91 | 91 | $tags = []; |
| 92 | - if(is_array($this->listTags) || is_object($this->listTags)) { |
|
| 92 | + if (is_array($this->listTags) || is_object($this->listTags)) { |
|
| 93 | 93 | foreach ($this->listTags as $tag) { |
| 94 | 94 | $tags[] = $tag->getName(); |
| 95 | 95 | } |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | */ |
| 124 | 124 | public function downloadGameAction($slug) |
| 125 | 125 | { |
| 126 | - $item = $this->getOne($slug, !$this->is('EXTERIEUR')); |
|
| 126 | + $item = $this->getOne($slug, !$this->is('EXTERIEUR')); |
|
| 127 | 127 | return $this->download($item); |
| 128 | 128 | } |
| 129 | 129 | } |