@@ -36,8 +36,6 @@ |
||
36 | 36 | /** |
37 | 37 | * On remplit la listUsers selon les paramètres rentrés |
38 | 38 | * Chaque array contient les noms proposés, une image et la position de la proposition correcte |
39 | - * @param Facegame $game La partie à populer |
|
40 | - * @return bool Si la partie est possible ou non (assez d'élève dans la promo) |
|
41 | 39 | */ |
42 | 40 | public function fillUserList(Facegame $facegame) |
43 | 41 | { |
@@ -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); |
@@ -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) |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * Précise si une classe peut être likée par l'utilisateur actuel |
15 | 15 | * @param mixed $item L'item à tester |
16 | - * @return boolean |
|
16 | + * @return boolean|null |
|
17 | 17 | */ |
18 | 18 | protected function isLikeable($item) |
19 | 19 | { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * Set listLikes |
135 | 135 | * |
136 | 136 | * @param \KI\UserBundle\Entity\User $listLikes |
137 | - * @return LikeClass |
|
137 | + * @return User |
|
138 | 138 | */ |
139 | 139 | public function setLikes($listLikes) |
140 | 140 | { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * Set listDislikes |
179 | 179 | * |
180 | 180 | * @param \KI\UserBundle\Entity\User $listDislikes |
181 | - * @return LikeClass |
|
181 | + * @return User |
|
182 | 182 | */ |
183 | 183 | public function setDislikes($listDislikes) |
184 | 184 | { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | /** |
52 | 52 | * @param string $base64 |
53 | - * @return array |
|
53 | + * @return string |
|
54 | 54 | */ |
55 | 55 | public function uploadFromBase64($base64) |
56 | 56 | { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @param string $search La recherche complète venant de la requête |
22 | - * @return array $category, $criteria |
|
22 | + * @return string[] $category, $criteria |
|
23 | 23 | * @throws BadRequestHttpException Si le format n'est pas bon |
24 | 24 | */ |
25 | 25 | public function analyzeRequest($search) |
@@ -60,6 +60,12 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | // On fouille un repo à la recherche d'entités correspondantes au nom |
63 | + |
|
64 | + /** |
|
65 | + * @param string $repositoryName |
|
66 | + * @param string $criteria |
|
67 | + * @param string $additionnalField |
|
68 | + */ |
|
63 | 69 | protected function searchRepository($repositoryName, $criteria, $additionnalField = null) { |
64 | 70 | $repository = $this->manager->getRepository($repositoryName); |
65 | 71 | $qb = $repository->createQueryBuilder('e'); |
@@ -87,6 +93,10 @@ discard block |
||
87 | 93 | } |
88 | 94 | |
89 | 95 | // La recherche d'user demande une fonction particulière (champs différents, acronyme...) |
96 | + |
|
97 | + /** |
|
98 | + * @param string $criteria |
|
99 | + */ |
|
90 | 100 | protected function searchUser($criteria) { |
91 | 101 | $qb = $this->userRepository->createQueryBuilder('e'); |
92 | 102 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | * Ajoute une conso |
32 | 32 | * @param string $userSlug |
33 | 33 | * @param string $beerSlug |
34 | - * @return float $newBalance |
|
34 | + * @return integer $newBalance |
|
35 | 35 | * @throws NotFoundHttpException Si l'utilisateur n'est pas trouvé |
36 | 36 | * @throws NotFoundHttpException Si la bière n'est pas trouvé |
37 | 37 | */ |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * Crédite un compte |
64 | 64 | * @param string $userSlug |
65 | 65 | * @param float $amount |
66 | - * @return float $newBalance |
|
66 | + * @return integer $newBalance |
|
67 | 67 | * @throws NotFoundHttpException Si l'utilisateur n'est pas trouvé |
68 | 68 | */ |
69 | 69 | public function addCreditTransaction($userSlug, $amount) |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * Recalcule le solde d'un utilisateur à partir de ses transactions |
105 | 105 | * @param User $user |
106 | - * @return float $balance |
|
106 | + * @return integer $balance |
|
107 | 107 | */ |
108 | 108 | public function rebuildBalance(User $user) |
109 | 109 | { |
@@ -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 { |
@@ -108,8 +108,7 @@ |
||
108 | 108 | if($newBalance < 0){ |
109 | 109 | if($balance >= 0) { |
110 | 110 | $negativeBalance = new UserNegativeBalanceEvent($user, true); |
111 | - } |
|
112 | - else { |
|
111 | + } else { |
|
113 | 112 | $negativeBalance = new UserNegativeBalanceEvent($user, false); |
114 | 113 | } |
115 | 114 | $this->eventDispatcher->dispatch('upont.negative_balance', $negativeBalance); |
@@ -182,7 +182,7 @@ |
||
182 | 182 | /** |
183 | 183 | * Get authorUser |
184 | 184 | * |
185 | - * @return \KI\UserBundle\Entity\User |
|
185 | + * @return \KI\UserBundle\Entity\Club |
|
186 | 186 | */ |
187 | 187 | public function getAuthorUser() |
188 | 188 | { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | /** |
208 | - * @return mixed |
|
208 | + * @return Post |
|
209 | 209 | */ |
210 | 210 | public function getPost() |
211 | 211 | { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
216 | - * @param mixed $post |
|
216 | + * @param Post $post |
|
217 | 217 | */ |
218 | 218 | public function setPost($post) |
219 | 219 | { |
@@ -4,8 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\ORM\Mapping as ORM; |
6 | 6 | use JMS\Serializer\Annotation as JMS; |
7 | -use Symfony\Component\HttpFoundation\File\UploadedFile; |
|
8 | - |
|
9 | 7 | use Symfony\Component\Validator\Constraints as Assert; |
10 | 8 | |
11 | 9 | /** |