@@ -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 |
@@ -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 |
@@ -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 | } |
@@ -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 | /** |
@@ -14,17 +14,17 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller; |
16 | 16 | |
17 | -use Symfony\Component\HttpFoundation\Request; |
|
18 | 17 | use AppBundle\Controller\AbstractController; |
18 | +use AppBundle\Entity\User; |
|
19 | +use AppBundle\Form\Type\UserFilterType; |
|
20 | +use AppBundle\Form\Type\UserType; |
|
21 | +use Doctrine\ORM\QueryBuilder; |
|
19 | 22 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
20 | 23 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
21 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
22 | 24 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
23 | -use AppBundle\Entity\User; |
|
24 | -use AppBundle\Form\Type\UserType; |
|
25 | -use AppBundle\Form\Type\UserFilterType; |
|
25 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
26 | 26 | use Symfony\Component\Form\FormInterface; |
27 | -use Doctrine\ORM\QueryBuilder; |
|
27 | +use Symfony\Component\HttpFoundation\Request; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * User controller. |
@@ -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 | } |
@@ -14,18 +14,17 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller; |
16 | 16 | |
17 | -use Symfony\Component\HttpFoundation\Request; |
|
18 | -use Symfony\Component\HttpFoundation\Response; |
|
19 | 17 | use AppBundle\Controller\AbstractController; |
20 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
21 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
22 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
23 | - |
|
24 | 18 | use AppBundle\Entity\Inventory; |
25 | -use AppBundle\Form\Type\InventoryType; |
|
26 | 19 | use AppBundle\Entity\InventoryArticles; |
27 | 20 | use AppBundle\Form\Type\InventoryEditType; |
21 | +use AppBundle\Form\Type\InventoryType; |
|
28 | 22 | use AppBundle\Form\Type\InventoryValidType; |
23 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
24 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
25 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
26 | +use Symfony\Component\HttpFoundation\Request; |
|
27 | +use Symfony\Component\HttpFoundation\Response; |
|
29 | 28 | |
30 | 29 | /** |
31 | 30 | * Inventory controller. |
@@ -14,8 +14,8 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller; |
16 | 16 | |
17 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
|
18 | 17 | use Doctrine\ORM\QueryBuilder; |
18 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * Abstract controller |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | { |
48 | 48 | $session = $this->getRequest()->getSession(); |
49 | 49 | |
50 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
50 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
62 | 62 | if (is_array($order = $this->getOrder($name))) { |
63 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
63 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
@@ -14,15 +14,15 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller; |
16 | 16 | |
17 | -use Symfony\Component\HttpFoundation\Request; |
|
18 | 17 | use AppBundle\Controller\AbstractController; |
19 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
20 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
21 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
22 | 18 | use AppBundle\Entity\Article; |
23 | 19 | use AppBundle\Entity\Supplier; |
24 | -use AppBundle\Form\Type\ArticleType; |
|
25 | 20 | use AppBundle\Form\Type\ArticleReassignType; |
21 | +use AppBundle\Form\Type\ArticleType; |
|
22 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
23 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
24 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
|
25 | +use Symfony\Component\HttpFoundation\Request; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Article controller. |
@@ -14,10 +14,10 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller; |
16 | 16 | |
17 | -use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
|
18 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
19 | 17 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
18 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
|
20 | 19 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
20 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
|
21 | 21 | use Symfony\Component\HttpFoundation\Response; |
22 | 22 | |
23 | 23 | /** |
@@ -14,13 +14,13 @@ |
||
14 | 14 | */ |
15 | 15 | namespace AppBundle\Controller\Settings\Divers; |
16 | 16 | |
17 | -use Symfony\Component\HttpFoundation\Request; |
|
18 | 17 | use AppBundle\Controller\AbstractController; |
18 | +use AppBundle\Entity\Tva; |
|
19 | +use AppBundle\Form\Type\TvaType; |
|
19 | 20 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
20 | 21 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
21 | 22 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
22 | -use AppBundle\Entity\Tva; |
|
23 | -use AppBundle\Form\Type\TvaType; |
|
23 | +use Symfony\Component\HttpFoundation\Request; |
|
24 | 24 | |
25 | 25 | /** |
26 | 26 | * Tva controller. |