@@ -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) |
@@ -408,9 +408,9 @@ |
||
| 408 | 408 | return $this->users = $users; |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - /** |
|
| 412 | - * @JMS\Expose |
|
| 413 | - */ |
|
| 411 | + /** |
|
| 412 | + * @JMS\Expose |
|
| 413 | + */ |
|
| 414 | 414 | protected $downloaded = false; |
| 415 | 415 | |
| 416 | 416 | public function hasBeenDownloadedBy(\KI\UserBundle\Entity\User $user) |
@@ -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 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -25,9 +25,9 @@ |
||
| 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 | ); |
@@ -143,10 +143,10 @@ discard block |
||
| 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 |
||
| 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 |
@@ -107,7 +107,7 @@ |
||
| 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 |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function findFollowedEvents($userId, $limit = null, $page = null) |
| 19 | 19 | { |
| 20 | - $query = $this->getEntityManager()->createQuery('SELECT event FROM |
|
| 20 | + $query = $this->getEntityManager()->createQuery('SELECT event FROM |
|
| 21 | 21 | KIPublicationBundle:Event event, |
| 22 | 22 | KIUserBundle:Club club, |
| 23 | 23 | KIUserBundle:User user |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | ') |
| 34 | 34 | ->setParameter('userId', $userId); |
| 35 | 35 | |
| 36 | - if($limit !== null && $limit > 0) { |
|
| 36 | + if ($limit !== null && $limit > 0) { |
|
| 37 | 37 | $query->setMaxResults($limit); |
| 38 | 38 | |
| 39 | 39 | if ($page !== null && $page > 0) |
| 40 | - $query->setFirstResult(($page - 1) * $limit); |
|
| 40 | + $query->setFirstResult(($page - 1)*$limit); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $query->getResult(); |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | public function getOnlineUsers($delay = 30) { |
| 102 | 102 | return $this->createQueryBuilder('u') |
| 103 | 103 | ->where('u.lastConnect > :date') |
| 104 | - ->setParameter('date', time() - $delay * 60) |
|
| 104 | + ->setParameter('date', time() - $delay*60) |
|
| 105 | 105 | ->getQuery() |
| 106 | 106 | ->getResult(); |
| 107 | 107 | } |
@@ -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); |