@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function filelistAction($token, Request $request) |
| 45 | 45 | { |
| 46 | - $path = __DIR__ . '/../../../../web/uploads/tmp/'; |
|
| 46 | + $path = __DIR__.'/../../../../web/uploads/tmp/'; |
|
| 47 | 47 | if ($token != $this->container->getParameter('fleur_token')) { |
| 48 | 48 | return $this->json('Vous n\'avez pas le droit de faire ça', 403); |
| 49 | 49 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | // On récupère le contenu du fichier |
| 57 | 57 | $request->files->get('filelist')->move($path, 'files.list'); |
| 58 | - $list = fopen($path . 'files.list', 'r+'); |
|
| 58 | + $list = fopen($path.'files.list', 'r+'); |
|
| 59 | 59 | if ($list === false) { |
| 60 | 60 | throw new BadRequestHttpException('Erreur lors de l\'upload du fichier'); |
| 61 | 61 | } |
@@ -42,11 +42,11 @@ |
||
| 42 | 42 | // On regarde les détails sur chaque utilisateur |
| 43 | 43 | $downloaderCategories = []; |
| 44 | 44 | $downloaderSeries = [ |
| 45 | - ['name' => 'Films', 'data' => []], |
|
| 46 | - ['name' => 'Séries', 'data' => []], |
|
| 47 | - ['name' => 'Jeux', 'data' => []], |
|
| 45 | + ['name' => 'Films', 'data' => []], |
|
| 46 | + ['name' => 'Séries', 'data' => []], |
|
| 47 | + ['name' => 'Jeux', 'data' => []], |
|
| 48 | 48 | ['name' => 'Logiciels', 'data' => []], |
| 49 | - ['name' => 'Autres', 'data' => []] |
|
| 49 | + ['name' => 'Autres', 'data' => []] |
|
| 50 | 50 | ]; |
| 51 | 51 | |
| 52 | 52 | foreach ($downloaderIds as $key => $value) { |
@@ -44,11 +44,11 @@ |
||
| 44 | 44 | ['Autres', 0] |
| 45 | 45 | ]; |
| 46 | 46 | $timeline = [ |
| 47 | - ['name' => 'Films', 'data' => [[$date, 0]]], |
|
| 48 | - ['name' => 'Épisodes', 'data' => [[$date, 0]]], |
|
| 49 | - ['name' => 'Jeux', 'data' => [[$date, 0]]], |
|
| 47 | + ['name' => 'Films', 'data' => [[$date, 0]]], |
|
| 48 | + ['name' => 'Épisodes', 'data' => [[$date, 0]]], |
|
| 49 | + ['name' => 'Jeux', 'data' => [[$date, 0]]], |
|
| 50 | 50 | ['name' => 'Logiciels', 'data' => [[$date, 0]]], |
| 51 | - ['name' => 'Autres', 'data' => [[$date, 0]]] |
|
| 51 | + ['name' => 'Autres', 'data' => [[$date, 0]]] |
|
| 52 | 52 | ]; |
| 53 | 53 | $totalSize = 0; |
| 54 | 54 | $hipster = 0; |
@@ -176,7 +176,7 @@ |
||
| 176 | 176 | |
| 177 | 177 | $transaction = $this->findBySlug($id); |
| 178 | 178 | $helper = $this->get('ki_foyer.helper.transaction'); |
| 179 | - $helper->updateBalance($transaction->getUser(), -1 * $transaction->getAmount()); |
|
| 179 | + $helper->updateBalance($transaction->getUser(), -1*$transaction->getAmount()); |
|
| 180 | 180 | |
| 181 | 181 | $this->delete($id, $this->isFoyerMember()); |
| 182 | 182 | |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | */ |
| 80 | 80 | public function getCourseAction($slug) |
| 81 | 81 | { |
| 82 | - $course = $this->getOne($slug); |
|
| 82 | + $course = $this->getOne($slug); |
|
| 83 | 83 | |
| 84 | 84 | return $this->json($course); |
| 85 | 85 | } |
@@ -94,11 +94,11 @@ |
||
| 94 | 94 | $response = new Response(); |
| 95 | 95 | $filepath = $exercice->getAbsolutePath(); |
| 96 | 96 | $course = $exercice->getCourse(); |
| 97 | - $filename = '(' . $course->getDepartment() . ') ' . $course->getName() . ' - ' . $exercice->getName() . '.pdf'; |
|
| 97 | + $filename = '('.$course->getDepartment().') '.$course->getName().' - '.$exercice->getName().'.pdf'; |
|
| 98 | 98 | |
| 99 | 99 | $response->headers->set('Cache-Control', 'private'); |
| 100 | 100 | $response->headers->set('Content-type', mime_content_type($filepath)); |
| 101 | - $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '";'); |
|
| 101 | + $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'";'); |
|
| 102 | 102 | $response->headers->set('Content-length', filesize($filepath)); |
| 103 | 103 | |
| 104 | 104 | $response->sendHeaders(); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | { |
| 50 | 50 | $plainPassword = $credentials['password']; |
| 51 | 51 | |
| 52 | - if($user->getLoginMethod() != 'form') |
|
| 52 | + if ($user->getLoginMethod() != 'form') |
|
| 53 | 53 | throw new CustomUserMessageAuthenticationException('No password available'); |
| 54 | 54 | |
| 55 | 55 | if (!$this->passwordEncoder->isPasswordValid($user, $plainPassword)) { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | // Sinon, on lance le check associé |
| 66 | 66 | $check = false; |
| 67 | - $method = 'check' . $achievement->getIdA(); |
|
| 67 | + $method = 'check'.$achievement->getIdA(); |
|
| 68 | 68 | if (method_exists($this, $method)) |
| 69 | 69 | $check = $this->$method(); |
| 70 | 70 | |
@@ -89,11 +89,11 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $total = count(Achievement::getConstants()); |
| 92 | - if (count($this->achievements) >= $total * 0.5) { |
|
| 92 | + if (count($this->achievements) >= $total*0.5) { |
|
| 93 | 93 | $achievementCheck = new AchievementCheckEvent(Achievement::CRAZY_UNLOCKER); |
| 94 | 94 | $this->check($achievementCheck); |
| 95 | 95 | } |
| 96 | - if (count($this->achievements) >= $total * 0.9) { |
|
| 96 | + if (count($this->achievements) >= $total*0.9) { |
|
| 97 | 97 | $achievementCheck = new AchievementCheckEvent(Achievement::TOTAL_UNLOCKER); |
| 98 | 98 | $this->check($achievementCheck); |
| 99 | 99 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $factor += 0.75; |
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | - return ceil($factor * $points); |
|
| 126 | + return ceil($factor*$points); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | // Fonctions de check correspondant aux divers achievements |
@@ -191,14 +191,14 @@ discard block |
||
| 191 | 191 | // Télécharger plus de 100Go sur Ponthub |
| 192 | 192 | public function check60() |
| 193 | 193 | { |
| 194 | - return $this->totalPontHubSize() > (100 * 1024 * 1024 * 1024); |
|
| 194 | + return $this->totalPontHubSize() > (100*1024*1024*1024); |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | // Ultimate Downloader |
| 198 | 198 | // Télécharger plus de 500Go sur Ponthub |
| 199 | 199 | public function check70() |
| 200 | 200 | { |
| 201 | - return $this->totalPontHubSize() > (500 * 1024 * 1024 * 1024); |
|
| 201 | + return $this->totalPontHubSize() > (500*1024*1024*1024); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | private function totalPontHubSize() |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function __construct(EntityManager $manager, TokenStorage $tokenStorage) |
| 15 | 15 | { |
| 16 | - $this->manager = $manager; |
|
| 16 | + $this->manager = $manager; |
|
| 17 | 17 | $this->tokenStorage = $tokenStorage; |
| 18 | 18 | } |
| 19 | 19 | |