@@ -216,7 +216,7 @@ |
||
216 | 216 | * @param string $name route/entity name |
217 | 217 | * @param string $route route name, if different from entity name |
218 | 218 | * @param array $params possible route parameters |
219 | - * @return Response |
|
219 | + * @return \Symfony\Component\HttpFoundation\RedirectResponse|null |
|
220 | 220 | */ |
221 | 221 | protected function saveFilter(FormInterface $form, $name, $route = null, array $params = null) |
222 | 222 | { |
@@ -204,11 +204,11 @@ discard block |
||
204 | 204 | $url = $this->generateUrl($route ?: $name, is_null($params) ? array() : $params); |
205 | 205 | if (isset($request)) { |
206 | 206 | if ($request->query->has('submit-filter') && $form->handleRequest($request)->isValid()) { |
207 | - $request->getSession()->set('filter.' . $name, $request->query->get($form->getName())); |
|
207 | + $request->getSession()->set('filter.'.$name, $request->query->get($form->getName())); |
|
208 | 208 | |
209 | 209 | return $this->redirect($url); |
210 | 210 | } elseif ($request->query->has('reset-filter')) { |
211 | - $request->getSession()->set('filter.' . $name, null); |
|
211 | + $request->getSession()->set('filter.'.$name, null); |
|
212 | 212 | |
213 | 213 | return $this->redirect($url); |
214 | 214 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | protected function getFilter($name) |
246 | 246 | { |
247 | - return $this->getRequest()->getSession()->get('filter.' . $name); |
|
247 | + return $this->getRequest()->getSession()->get('filter.'.$name); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | /** |
@@ -94,8 +94,8 @@ |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
97 | - * @depends testCreate |
|
98 | - */ |
|
97 | + * @depends testCreate |
|
98 | + */ |
|
99 | 99 | |
100 | 100 | public function testSort() { |
101 | 101 | $client = static::createClient(); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'class' => 'AppBundle\Entity\Group', |
23 | 23 | 'expanded' => true, |
24 | 24 | 'multiple' => true, |
25 | - 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
|
25 | + 'apply_filter' => function(QueryInterface $filterQuery, $field, $values) { |
|
26 | 26 | $query = $filterQuery->getQueryBuilder(); |
27 | 27 | $query->leftJoin($field, 'm'); |
28 | 28 | // Filter results using orWhere matching ID |
@@ -70,7 +70,7 @@ |
||
70 | 70 | /** |
71 | 71 | * Test des entités |
72 | 72 | * |
73 | - * @return array |
|
73 | + * @return string|null |
|
74 | 74 | */ |
75 | 75 | private function testEntities() |
76 | 76 | { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | if ($item->getUri() === $request->getRequestUri()) { |
23 | 23 | // URL's completely match |
24 | 24 | return true; |
25 | - } elseif ($item->getUri() !== $request->getBaseUrl() . '/' && |
|
25 | + } elseif ($item->getUri() !== $request->getBaseUrl().'/' && |
|
26 | 26 | substr($request->getRequestUri(), 0, strlen($item->getUri())) |
27 | 27 | === $item->getUri()) { |
28 | 28 | // URL isn't just "/" and the first part of the URL match |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | /** |
297 | 297 | * Get supplier. |
298 | 298 | * |
299 | - * @return Supplier |
|
299 | + * @return string |
|
300 | 300 | */ |
301 | 301 | public function getSupplier() |
302 | 302 | { |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | /** |
321 | 321 | * Get unit_storage. |
322 | 322 | * |
323 | - * @return UnitStorage |
|
323 | + * @return string |
|
324 | 324 | */ |
325 | 325 | public function getUnitStorage() |
326 | 326 | { |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /** |
358 | 358 | * Get zone_storages. |
359 | 359 | * |
360 | - * @return \Doctrine\Common\Collections\Collection |
|
360 | + * @return string |
|
361 | 361 | */ |
362 | 362 | public function getZoneStorages() |
363 | 363 | { |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | /** |
382 | 382 | * Get family_log. |
383 | 383 | * |
384 | - * @return FamilyLog |
|
384 | + * @return string |
|
385 | 385 | */ |
386 | 386 | public function getFamilyLog() |
387 | 387 | { |
@@ -249,9 +249,9 @@ |
||
249 | 249 | |
250 | 250 | public function getIndentedName() { |
251 | 251 | if ($this->parent !== null) { |
252 | - return " >> " . $this->name; |
|
252 | + return " >> ".$this->name; |
|
253 | 253 | } else { |
254 | - return "- " . $this->name; |
|
254 | + return "- ".$this->name; |
|
255 | 255 | } |
256 | 256 | } |
257 | 257 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | protected function setOrder($name, $field, $type = 'ASC') |
173 | 173 | { |
174 | - $this->getRequest()->getSession()->set('sort.' . $name, array('field' => $field, 'type' => $type)); |
|
174 | + $this->getRequest()->getSession()->set('sort.'.$name, array('field' => $field, 'type' => $type)); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | $session = $this->getRequest()->getSession(); |
184 | 184 | |
185 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
185 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | { |
194 | 194 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
195 | 195 | if (is_array($order = $this->getOrder($name))) { |
196 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
196 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | */ |
291 | 291 | public function printAction(Inventory $inventory) |
292 | 292 | { |
293 | - $file = $inventory->getDate()->format('Ymd') . '-inventory.pdf'; |
|
293 | + $file = $inventory->getDate()->format('Ymd').'-inventory.pdf'; |
|
294 | 294 | // Créer et enregistrer le fichier PDF à imprimer |
295 | 295 | $html = $this->renderView( |
296 | 296 | 'AppBundle:Inventory:print.pdf.twig', |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | 200, |
308 | 308 | array( |
309 | 309 | 'Content-Type' => 'application/pdf', |
310 | - 'Content-Disposition' => 'attachment; filename="' . $file . '"' |
|
310 | + 'Content-Disposition' => 'attachment; filename="'.$file.'"' |
|
311 | 311 | ) |
312 | 312 | ); |
313 | 313 | } |