@@ -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 | /** |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
| 21 | 21 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
| 22 | 22 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
| 23 | - |
|
| 24 | 23 | use AppBundle\Entity\Inventory; |
| 25 | 24 | use AppBundle\Form\Type\InventoryType; |
| 26 | 25 | use AppBundle\Entity\InventoryArticles; |
@@ -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 | } |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace AppBundle\Entity; |
| 4 | 4 | |
| 5 | 5 | use Doctrine\ORM\Mapping as ORM; |
| 6 | -use Doctrine\Common\Collections\ArrayCollection; |
|
| 7 | 6 | |
| 8 | 7 | /** |
| 9 | 8 | * InventoryArticles |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | protected function setOrder($name, $field, $type = 'ASC') |
| 35 | 35 | { |
| 36 | - $this->getRequest()->getSession()->set('sort.' . $name, array('field' => $field, 'type' => $type)); |
|
| 36 | + $this->getRequest()->getSession()->set('sort.'.$name, array('field' => $field, 'type' => $type)); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $session = $this->getRequest()->getSession(); |
| 48 | 48 | |
| 49 | - return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; |
|
| 49 | + return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $alias = current($qb->getDQLPart('from'))->getAlias(); |
| 61 | 61 | if (is_array($order = $this->getOrder($name))) { |
| 62 | - $qb->orderBy($alias . '.' . $order['field'], $order['type']); |
|
| 62 | + $qb->orderBy($alias.'.'.$order['field'], $order['type']); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | $url = null; |
| 93 | 93 | // Go to installActions |
| 94 | 94 | } else { |
| 95 | - foreach ($inventories as $inventory){ |
|
| 95 | + foreach ($inventories as $inventory) { |
|
| 96 | 96 | if ($inventory->getstatus() === 1 || $inventory->getStatus() === 2) { |
| 97 | - $message = $this->get('translator')->trans('yet',array(),'gs_inventories'); |
|
| 97 | + $message = $this->get('translator')->trans('yet', array(), 'gs_inventories'); |
|
| 98 | 98 | $this->addFlash('danger', $message); |
| 99 | 99 | $url = 'inventory'; |
| 100 | 100 | break; |