@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | return $this->createForm( |
| 41 | 41 | OrdersType::class, |
| 42 | 42 | $orders, |
| 43 | - ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST',] |
|
| 43 | + ['attr' => ['id' => 'create'], 'action' => $this->generateUrl($route), 'method' => 'POST', ] |
|
| 44 | 44 | ); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->addRolesAction($editForm, $entity); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - return [$prefixRoute => $entity, 'edit_form' => $editForm->createView(),]; |
|
| 66 | + return [$prefixRoute => $entity, 'edit_form' => $editForm->createView(), ]; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -117,22 +117,22 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | protected function abstractPrintAction(Orders $orders, $from) |
| 119 | 119 | { |
| 120 | - $file = $from . '-' . $orders->getId() . '.pdf'; |
|
| 120 | + $file = $from.'-'.$orders->getId().'.pdf'; |
|
| 121 | 121 | $company = $this->getDoctrine()->getManager()->getRepository('AppBundle:Company')->find(1); |
| 122 | 122 | // Create and save the PDF file to print |
| 123 | 123 | $html = $this->renderView( |
| 124 | - 'AppBundle:Orders/' . $from . ':print.pdf.twig', |
|
| 124 | + 'AppBundle:Orders/'.$from.':print.pdf.twig', |
|
| 125 | 125 | ['articles' => $orders->getArticles(), 'orders' => $orders, 'company' => $company, ] |
| 126 | 126 | ); |
| 127 | 127 | return new Response( |
| 128 | 128 | $this->get('knp_snappy.pdf')->getOutputFromHtml( |
| 129 | 129 | $html, |
| 130 | - $this->get('app.helper.controller')->getArray((string)date('d/m/y - H:i:s'), '') |
|
| 130 | + $this->get('app.helper.controller')->getArray((string) date('d/m/y - H:i:s'), '') |
|
| 131 | 131 | ), |
| 132 | 132 | 200, |
| 133 | 133 | array( |
| 134 | 134 | 'Content-Type' => 'application/pdf', |
| 135 | - 'Content-Disposition' => 'attachment; filename="' . $file . '"' |
|
| 135 | + 'Content-Disposition' => 'attachment; filename="'.$file.'"' |
|
| 136 | 136 | ) |
| 137 | 137 | ); |
| 138 | 138 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $etm = $this->getDoctrine()->getManager(); |
| 43 | 43 | $item = $this->container->getParameter('knp_paginator.page_range'); |
| 44 | 44 | $qbd = $etm->getRepository('AppBundle:Orders\Orders')->createQueryBuilder('o'); |
| 45 | - $qbd->where('o.delivdate <= ' . date('Y-m-d')); |
|
| 45 | + $qbd->where('o.delivdate <= '.date('Y-m-d')); |
|
| 46 | 46 | $qbd->andWhere('o.status = 1'); |
| 47 | 47 | |
| 48 | 48 | $paginator = $this->get('knp_paginator')->paginate($qbd, $request->query->get('page', 1), $item); |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | |
| 116 | 116 | $orders = new Orders(); |
| 117 | 117 | $form = $this->createForm(OrdersType::class, $orders); |
| 118 | - $return = ['orders' => $orders, 'form' => $form->createView(),]; |
|
| 118 | + $return = ['orders' => $orders, 'form' => $form->createView(), ]; |
|
| 119 | 119 | $form->handleRequest($request); |
| 120 | 120 | $supplier = $orders->getSupplier(); |
| 121 | 121 | $articles = $etm->getRepository('AppBundle:Article')->getArticleFromSupplier($supplier->getId()); |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 32 | 32 | { |
| 33 | 33 | $builder |
| 34 | - ->add('name', null, ['label' => 'form.group_name', 'translation_domain' => 'FOSUserBundle',]); |
|
| 34 | + ->add('name', null, ['label' => 'form.group_name', 'translation_domain' => 'FOSUserBundle', ]); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -33,15 +33,15 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | $builder |
| 35 | 35 | ->add('username', 'filter_text', ['label' => 'form.username', 'translation_domain' => 'FOSUserBundle', |
| 36 | - 'attr' => ['class' => 'pull-right',],]) |
|
| 36 | + 'attr' => ['class' => 'pull-right', ], ]) |
|
| 37 | 37 | ->add('email', 'filter_text', ['label' => 'form.email', 'translation_domain' => 'FOSUserBundle', |
| 38 | - 'attr' => ['class' => 'pull-right',],]) |
|
| 39 | - ->add('enabled', 'filter_boolean', ['label' => 'Autorisé',]) |
|
| 38 | + 'attr' => ['class' => 'pull-right', ], ]) |
|
| 39 | + ->add('enabled', 'filter_boolean', ['label' => 'Autorisé', ]) |
|
| 40 | 40 | ->add( |
| 41 | 41 | 'groups', |
| 42 | 42 | 'filter_entity', |
| 43 | 43 | ['label' => 'Groupes', 'class' => 'AppBundle\Entity\Staff\Group', 'expanded' => true, |
| 44 | - 'multiple' => true, 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
|
| 44 | + 'multiple' => true, 'apply_filter' => function(QueryInterface $filterQuery, $field, $values) { |
|
| 45 | 45 | $query = $filterQuery->getQueryBuilder(); |
| 46 | 46 | $query->leftJoin($field, 'm'); |
| 47 | 47 | // Filter results using orWhere matching ID |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function configureOptions(OptionsResolver $resolver) |
| 60 | 60 | { |
| 61 | 61 | $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Staff\User', 'csrf_protection' => false, |
| 62 | - 'validation_groups' => ['filter'], 'method' => 'GET',]); |
|
| 62 | + 'validation_groups' => ['filter'], 'method' => 'GET', ]); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 37 | 37 | { |
| 38 | - $builder ->add('username', null, ['label' => "Nom d'utilisateur", 'attr' => ['class' => 'form-control'],]) |
|
| 38 | + $builder ->add('username', null, ['label' => "Nom d'utilisateur", 'attr' => ['class' => 'form-control'], ]) |
|
| 39 | 39 | ->add('email', EmailType::class, array( |
| 40 | 40 | 'required' => false, |
| 41 | 41 | 'label' => 'E-mail', |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function configureOptions(OptionsResolver $resolver) |
| 43 | 43 | { |
| 44 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Stocks\InventoryArticles',]); |
|
| 44 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Stocks\InventoryArticles', ]); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $builder |
| 37 | 37 | ->add('date', DateType::class, ['label' => 'gestock.date', 'widget' => 'single_text', |
| 38 | 38 | 'format' => 'dd MMM yyyy', 'html5' => false, 'input' => 'datetime', |
| 39 | - 'attr' => ['class' => 'form-control',],]) |
|
| 39 | + 'attr' => ['class' => 'form-control', ], ]) |
|
| 40 | 40 | ->add('status', HiddenType::class) |
| 41 | 41 | ->add('amount', HiddenType::class) |
| 42 | 42 | ; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public function configureOptions(OptionsResolver $resolver) |
| 49 | 49 | { |
| 50 | - $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Stocks\Inventory',]); |
|
| 50 | + $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Stocks\Inventory', ]); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | parent::buildForm($builder, $options); |
| 38 | 38 | $builder |
| 39 | 39 | ->remove('articles') |
| 40 | - ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesZonesType::class,]); |
|
| 40 | + ->add('articles', CollectionType::class, ['entry_type' => InventoryArticlesZonesType::class, ]); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |