@@ -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 | |
@@ -105,8 +105,8 @@ |
||
| 105 | 105 | $user->setBalance($newBalance); |
| 106 | 106 | $this->manager->flush(); |
| 107 | 107 | |
| 108 | - if($newBalance < 0){ |
|
| 109 | - if($balance >= 0) { |
|
| 108 | + if ($newBalance < 0) { |
|
| 109 | + if ($balance >= 0) { |
|
| 110 | 110 | $negativeBalance = new UserNegativeBalanceEvent($user, true); |
| 111 | 111 | } |
| 112 | 112 | else { |
@@ -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(); |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | foreach (array_keys($all) as $id) { |
| 53 | 53 | $name = $courseName[$id]; |
| 54 | 54 | $gr = str_replace('( )', '', $group[$id]); |
| 55 | - $gr = $gr != '' ? (int) str_replace(['(Gr', ')'], ['', ''], $gr) : 0; |
|
| 55 | + $gr = $gr != '' ? (int)str_replace(['(Gr', ')'], ['', ''], $gr) : 0; |
|
| 56 | 56 | |
| 57 | 57 | $data = explode(':', $start[$id]); |
| 58 | 58 | $startDate = $data[0]*3600 + $data[1]*60; |
@@ -48,8 +48,8 @@ |
||
| 48 | 48 | $user->setEmail($email); |
| 49 | 49 | |
| 50 | 50 | $password = $this->array_value($attributes, 'password'); |
| 51 | - if(!$password) { |
|
| 52 | - $password = substr(str_shuffle(strtolower(sha1(rand() . time() . 'salt'))), 0, 8); |
|
| 51 | + if (!$password) { |
|
| 52 | + $password = substr(str_shuffle(strtolower(sha1(rand().time().'salt'))), 0, 8); |
|
| 53 | 53 | $attributes['password'] = $password; |
| 54 | 54 | } |
| 55 | 55 | |
@@ -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)) { |