| @@ -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 | 
| @@ -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 | } | 
| @@ -41,14 +41,14 @@ | ||
| 41 | 41 |      { | 
| 42 | 42 | $builder->addEventListener( | 
| 43 | 43 | FormEvents::PRE_SET_DATA, | 
| 44 | -            function (FormEvent $event) { | |
| 44 | +            function(FormEvent $event) { | |
| 45 | 45 | $form = $event->getForm(); | 
| 46 | 46 | $articles = $event->getData(); | 
| 47 | 47 | |
| 48 | 48 | $formOptions = array( | 
| 49 | 49 | 'class' => 'GlsrGestockBundle:Supplier', | 
| 50 | 50 | 'query_builder' => | 
| 51 | -                    function (EntityRepository $er) use ($articles) { | |
| 51 | +                    function(EntityRepository $er) use ($articles) { | |
| 52 | 52 | return $er->getSupplierForReassign($articles[0]); | 
| 53 | 53 | }, | 
| 54 | 54 | 'multiple' => false, | 
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | 'entity', | 
| 47 | 47 | array( | 
| 48 | 48 | 'class' => 'AppBundle:FamilyLog', | 
| 49 | -                    'query_builder' => function (EntityRepository $er) { | |
| 49 | +                    'query_builder' => function(EntityRepository $er) { | |
| 50 | 50 |                          return $er->createQueryBuilder('f') | 
| 51 | 51 |                              ->orderBy('f.path', 'ASC'); | 
| 52 | 52 | }, | 
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | 'entity', | 
| 47 | 47 | array( | 
| 48 | 48 | 'class' => 'AppBundle:FamilyLog', | 
| 49 | -                    'query_builder' => function (EntityRepository $er) { | |
| 49 | +                    'query_builder' => function(EntityRepository $er) { | |
| 50 | 50 |                          return $er->createQueryBuilder('f') | 
| 51 | 51 |                              ->orderBy('f.path', 'ASC'); | 
| 52 | 52 | }, | 
| @@ -195,6 +195,9 @@ | ||
| 195 | 195 | } | 
| 196 | 196 | } | 
| 197 | 197 | |
| 198 | + /** | |
| 199 | + * @param string $entityName | |
| 200 | + */ | |
| 198 | 201 |      private function testReturnParam($entity, $entityName) { | 
| 199 | 202 |          if ($entityName === 'company' || $entityName === 'settings' || $entityName === 'tva') { | 
| 200 | 203 |              $param = array('id' => $entity->getId()); | 
| @@ -141,7 +141,7 @@ discard block | ||
| 141 | 141 | $form = $this->createForm($typePath, $entityNew, array( | 
| 142 | 142 | 'action' => $this->generateUrl(strtolower($entity).'_create'), | 
| 143 | 143 | )); | 
| 144 | - $return = [$entity => $entityNew, 'form' => $form->createView(),]; | |
| 144 | + $return = [$entity => $entityNew, 'form' => $form->createView(), ]; | |
| 145 | 145 | |
| 146 | 146 |          if ($form->handleRequest($request)->isValid()) { | 
| 147 | 147 | $etm = $this->getDoctrine()->getManager(); | 
| @@ -267,7 +267,7 @@ discard block | ||
| 267 | 267 |      { | 
| 268 | 268 | $session = new Session(); | 
| 269 | 269 | |
| 270 | -        return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null; | |
| 270 | +        return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null; | |
| 271 | 271 | } | 
| 272 | 272 | |
| 273 | 273 | /** | 
| @@ -291,7 +291,7 @@ discard block | ||
| 291 | 291 |              } else { | 
| 292 | 292 |                  $alias = current($qbd->getDQLPart('from'))->getAlias(); | 
| 293 | 293 | } | 
| 294 | - $qbd->orderBy($alias . '.' . $order['field'], $order['type']); | |
| 294 | + $qbd->orderBy($alias.'.'.$order['field'], $order['type']); | |
| 295 | 295 | } | 
| 296 | 296 | } | 
| 297 | 297 | |
| @@ -85,7 +85,7 @@ discard block | ||
| 85 | 85 | 'entity', | 
| 86 | 86 | array( | 
| 87 | 87 | 'class' => 'AppBundle:Supplier', | 
| 88 | -                    'query_builder' => function (EntityRepository $er) { | |
| 88 | +                    'query_builder' => function(EntityRepository $er) { | |
| 89 | 89 |                          return $er->createQueryBuilder('s') | 
| 90 | 90 |                              ->where('s.active = 1'); | 
| 91 | 91 | }, | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | 'entity', | 
| 127 | 127 | array( | 
| 128 | 128 | 'class' => 'AppBundle:FamilyLog', | 
| 129 | -                    'query_builder' => function (EntityRepository $er) { | |
| 129 | +                    'query_builder' => function(EntityRepository $er) { | |
| 130 | 130 |                          return $er->createQueryBuilder('f') | 
| 131 | 131 |                              ->orderBy('f.path', 'ASC'); | 
| 132 | 132 | }, | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | $typeClass, | 
| 49 | 49 | $inventory, | 
| 50 | 50 |              ['action' => $this->generateUrl('inventory_update', ['id' => $inventory->getId()]), | 
| 51 | - 'method' => 'PUT',] | |
| 51 | + 'method' => 'PUT', ] | |
| 52 | 52 | ); | 
| 53 | 53 | $deleteForm = $this->createDeleteForm($inventory->getId(), 'inventory_delete'); | 
| 54 | 54 | |
| @@ -56,7 +56,7 @@ discard block | ||
| 56 | 56 | 'inventory' => $inventory, | 
| 57 | 57 | 'zoneStorages' => $zoneStorages, | 
| 58 | 58 | 'edit_form' => $editForm->createView(), | 
| 59 | - 'delete_form' => $deleteForm->createView(),]; | |
| 59 | + 'delete_form' => $deleteForm->createView(), ]; | |
| 60 | 60 | return $return; | 
| 61 | 61 | } | 
| 62 | 62 | |
| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 | return $this->createForm( | 
| 73 | 73 | InventoryType::class, | 
| 74 | 74 | $inventory, | 
| 75 | - ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'PUT',] | |
| 75 | + ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'PUT', ] | |
| 76 | 76 | ); | 
| 77 | 77 | } | 
| 78 | 78 | |