Completed
Push — master ( 5e4f38...1af8b6 )
by Laurent
08:07 queued 04:24
created
src/AppBundle/Controller/Install/AbstractInstallController.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
         if ($ctEntity > 0 && $request->getMethod() == 'GET' && is_int($number)) {
47 47
             $message = 'gestock.install.st'.$number.'.yet_exist';
48 48
         }
49
-        $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number),]);
49
+        $form = $this->createForm($typePath, $entityNew, ['action' => $this->generateUrl('gs_install_st'.$number), ]);
50 50
         if (is_int($number)) {
51
-            $return = ['message' => $message, 'form' => $form->createView(),];
51
+            $return = ['message' => $message, 'form' => $form->createView(), ];
52 52
         } else {
53
-            $return = [strtolower($entity) => $entityNew, 'form' => $form->createView(),];
53
+            $return = [strtolower($entity) => $entityNew, 'form' => $form->createView(), ];
54 54
         }
55 55
 
56 56
         if ($form->handleRequest($request)->isValid()) {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      * @param \Symfony\Component\Form\Form               $form      Form of Entity
70 70
      * @param \Doctrine\Common\Persistence\ObjectManager $etm       Entity Manager
71 71
      * @param integer                                     $number   Number of step install
72
-     * @return array Route after valid or not
72
+     * @return \Symfony\Component\HttpFoundation\RedirectResponse Route after valid or not
73 73
      */
74 74
     private function validInstall($entityNew, $form, ObjectManager $etm, $number)
75 75
     {
Please login to merge, or discard this patch.
src/AppBundle/Controller/AbstractController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
      * @param \Symfony\Component\HttpFoundation\Request $request   Request in progress
227 227
      * @param string $entityName Name of Entity
228 228
      * @param string $prefixRoute Prefix of Route
229
-     * @return array
229
+     * @return \Symfony\Component\HttpFoundation\RedirectResponse
230 230
      */
231 231
     public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName, $prefixRoute)
232 232
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             $this->addRolesAction($form, $entityNew);
123 123
         }
124 124
         $form->handleRequest($request);
125
-        $return = [$entityName => $entityNew, 'form' => $form->createView(),];
125
+        $return = [$entityName => $entityNew, 'form' => $form->createView(), ];
126 126
 
127 127
         if ($form->isValid()) {
128 128
             $etm = $this->getDoctrine()->getManager();
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
     public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName, $prefixRoute)
233 233
     {
234 234
         $etm = $this->getDoctrine()->getManager();
235
-        $form = $this->createDeleteForm($entity->getId(), $prefixRoute . '_delete');
235
+        $form = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete');
236 236
         $entityArticles = $etm
237
-            ->getRepository('AppBundle:' .  $entityName . 'Articles')
237
+            ->getRepository('AppBundle:'.$entityName.'Articles')
238 238
             ->findBy([$prefixRoute => $entity->getId()]);
239 239
 
240 240
         if ($form->handleRequest($request)->isValid()) {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             } else {
270 270
                 $alias = current($qbd->getDQLPart('from'))->getAlias();
271 271
             }
272
-            $qbd->orderBy($alias . '.' . $order['field'], $order['type']);
272
+            $qbd->orderBy($alias.'.'.$order['field'], $order['type']);
273 273
         }
274 274
     }
275 275
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     protected function testReturnParam($entity, $prefixRoute)
301 301
     {
302
-        $entityArray = ['article', 'supplier', 'familylog', 'zonestorage', 'unitstorage', 'material',];
302
+        $entityArray = ['article', 'supplier', 'familylog', 'zonestorage', 'unitstorage', 'material', ];
303 303
         if (in_array($prefixRoute, $entityArray, true)) {
304 304
             $param = ['slug' => $entity->getSlug()];
305 305
         } else {
Please login to merge, or discard this patch.
src/AppBundle/Controller/AbstractOrdersController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * Displays a form to edit an existing item entity.
49 49
      *
50
-     * @param Object $entity      Entity
50
+     * @param Orders $entity      Entity
51 51
      * @param string $prefixRoute Prefix of Route
52 52
      * @param string $typePath    Path of FormType
53 53
      * @return array
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * Edits an existing item entity.
71 71
      *
72
-     * @param Object                                    $entity      Entity
72
+     * @param Orders                                    $entity      Entity
73 73
      * @param \Symfony\Component\HttpFoundation\Request $request     Request in progress
74 74
      * @param string                                    $prefixRoute Prefix of Route
75 75
      * @param string                                    $typePath    Path of FormType
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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:' . $from . ':print.pdf.twig',
124
+            'AppBundle:'.$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
     }
Please login to merge, or discard this patch.
src/AppBundle/Controller/AbstractInventoryController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
             $typeClass,
51 51
             $inventory,
52 52
             ['action' => $this->generateUrl('inventory_update', ['id' => $inventory->getId()]),
53
-            'method' => 'PUT',]
53
+            'method' => 'PUT', ]
54 54
         );
55 55
         $deleteForm = $this->createDeleteForm($inventory->getId(), 'inventory_delete');
56 56
 
57 57
         $return = ['editForm' => $editForm, 'inventory' => $inventory, '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
 block discarded – undo
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
     
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/ArticleType.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,32 +44,32 @@  discard block
 block discarded – undo
44 44
             ->add(
45 45
                 'name',
46 46
                 TextType::class,
47
-                ['label' => 'gestock.title_item', 'attr'  => ['class' => 'form-control'],]
47
+                ['label' => 'gestock.title_item', 'attr'  => ['class' => 'form-control'], ]
48 48
             )
49 49
             ->add(
50 50
                 'packaging',
51 51
                 NumberType::class,
52 52
                 ['scale' => 3, 'grouping' => true, 'label' => 'settings.packaging',
53
-                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'],]
53
+                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'], ]
54 54
             )
55 55
             ->add(
56 56
                 'price',
57 57
                 MoneyType::class,
58 58
                 ['scale' => 3, 'grouping' => true, 'currency' => 'EUR', 'label' => 'settings.price',
59
-                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'],]
59
+                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'], ]
60 60
             )
61 61
             ->add(
62 62
                 'tva',
63 63
                 EntityType::class,
64 64
                 ['class' => 'AppBundle:Tva', 'choice_label' => 'name', 'multiple' => false,
65
-                    'label' => 'gestock.settings.diverse.vat', 'attr'  => ['class' => 'form-control'],]
65
+                    'label' => 'gestock.settings.diverse.vat', 'attr'  => ['class' => 'form-control'], ]
66 66
             )
67 67
             ->add('quantity', HiddenType::class, ['data' => 0])
68 68
             ->add(
69 69
                 'minstock',
70 70
                 NumberType::class,
71 71
                 ['scale' => 3, 'grouping' => true, 'label' => 'settings.stock_alert',
72
-                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'],]
72
+                    'translation_domain' => 'gs_articles', 'attr'  => ['class' => 'form-control'], ]
73 73
             )
74 74
             ->add('active', HiddenType::class, ['data' => true])
75 75
             ->add('slug', HiddenType::class)
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 EntityType::class,
79 79
                 array(
80 80
                     'class' => 'AppBundle:Supplier',
81
-                    'query_builder' => function (EntityRepository $er) {
81
+                    'query_builder' => function(EntityRepository $er) {
82 82
                         return $er->createQueryBuilder('s')
83 83
                             ->where('s.active = 1');
84 84
                     },
@@ -95,20 +95,20 @@  discard block
 block discarded – undo
95 95
                 'unitStorage',
96 96
                 EntityType::class,
97 97
                 ['class' => 'AppBundle:UnitStorage', 'choice_label' => 'name', 'multiple' => false,
98
-                    'label' => 'gestock.settings.diverse.unitstorage', 'attr'  => ['class' => 'form-control'],]
98
+                    'label' => 'gestock.settings.diverse.unitstorage', 'attr'  => ['class' => 'form-control'], ]
99 99
             )
100 100
             ->add(
101 101
                 'zoneStorages',
102 102
                 EntityType::class,
103 103
                 ['class' => 'AppBundle:ZoneStorage', 'choice_label' => 'name', 'multiple' => true, 'expanded' => true,
104
-                    'label' => 'gestock.settings.diverse.zonestorage', 'attr'  => ['class' => 'form-control'],]
104
+                    'label' => 'gestock.settings.diverse.zonestorage', 'attr'  => ['class' => 'form-control'], ]
105 105
             )
106 106
             ->add(
107 107
                 'familyLog',
108 108
                 EntityType::class,
109 109
                 [
110 110
                     'class' => 'AppBundle:FamilyLog',
111
-                    'query_builder' => function (EntityRepository $er) {
111
+                    'query_builder' => function(EntityRepository $er) {
112 112
                         return $er->createQueryBuilder('f')
113 113
                             ->orderBy('f.path', 'ASC');
114 114
                     },
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function configureOptions(OptionsResolver $resolver)
131 131
     {
132
-        $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Article',]);
132
+        $resolver->setDefaults(['data_class' => 'AppBundle\Entity\Article', ]);
133 133
     }
134 134
 
135 135
     /**
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/Config/MaterialType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,24 +39,24 @@  discard block
 block discarded – undo
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41 41
         $builder
42
-            ->add('name', TextType::class, ['label' => 'gestock.name', 'attr'  => ['class' => 'half'],])
42
+            ->add('name', TextType::class, ['label' => 'gestock.name', 'attr'  => ['class' => 'half'], ])
43 43
             ->add(
44 44
                 'unitStorage',
45 45
                 EntityType::class,
46 46
                 ['class' => 'AppBundle:UnitStorage', 'choice_label' => 'name', 'multiple' => false,
47
-                    'label' => 'gestock.settings.diverse.unitstorage', 'attr'  => ['class' => 'half'],]
47
+                    'label' => 'gestock.settings.diverse.unitstorage', 'attr'  => ['class' => 'half'], ]
48 48
             )
49
-            ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif',])
50
-            ->add('multiple', CheckboxType::class, ['required' => false, 'label' => 'gestock.multiple',])
49
+            ->add('active', CheckboxType::class, ['required' => false, 'label' => 'gestock.actif', ])
50
+            ->add('multiple', CheckboxType::class, ['required' => false, 'label' => 'gestock.multiple', ])
51 51
             ->add(
52 52
                 'articles',
53 53
                 EntityType::class,
54 54
                 ['class' => 'AppBundle:Article',
55
-                    'query_builder' => function (EntityRepository $er) {
55
+                    'query_builder' => function(EntityRepository $er) {
56 56
                         return $er->createQueryBuilder('a')->orderBy('a.name', 'ASC');
57 57
                     },
58 58
                     'choice_label' => 'name', 'multiple' => true, 'expanded' => true,
59
-                    'label' => 'title', 'translation_domain' => 'gs_articles',]
59
+                    'label' => 'title', 'translation_domain' => 'gs_articles', ]
60 60
             )
61 61
             ->addEventSubscriber(new AddSaveEditFieldSubscriber())
62 62
         ;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function configureOptions(OptionsResolver $resolver)
69 69
     {
70 70
         $resolver->setDefaults(
71
-            ['data_class' => 'AppBundle\Entity\Config\Material',]
71
+            ['data_class' => 'AppBundle\Entity\Config\Material', ]
72 72
         );
73 73
     }
74 74
 
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/FamilyLogType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@
 block discarded – undo
37 37
     public function buildForm(FormBuilderInterface $builder, array $options)
38 38
     {
39 39
         $builder
40
-            ->add('name', TextType::class, ['label' => 'gestock.settings.diverse.family',])
40
+            ->add('name', TextType::class, ['label' => 'gestock.settings.diverse.family', ])
41 41
             ->add(
42 42
                 'parent',
43 43
                 EntityType::class,
44 44
                 array(
45 45
                     'class' => 'AppBundle:FamilyLog',
46
-                    'query_builder' => function (EntityRepository $er) {
46
+                    'query_builder' => function(EntityRepository $er) {
47 47
                         return $er->createQueryBuilder('f')
48 48
                             ->orderBy('f.path', 'ASC');
49 49
                     },
Please login to merge, or discard this patch.
src/AppBundle/Form/EventListener/AddSaveEditFieldSubscriber.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
             $form->add(
44 44
                 'save',
45 45
                 SubmitType::class,
46
-                ['attr' => ['class' => 'btn btn-default btn-primary btn-create',], 'label' => 'Create',
47
-                    'translation_domain' => 'admin',]
46
+                ['attr' => ['class' => 'btn btn-default btn-primary btn-create', ], 'label' => 'Create',
47
+                    'translation_domain' => 'admin', ]
48 48
             )
49 49
             ->add(
50 50
                 'addmore',
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
             $form->add(
57 57
                 'save',
58 58
                 SubmitType::class,
59
-                ['attr' => ['class' => 'btn btn-default btn-primary btn-edit',], 'label' => 'Edit',
60
-                    'translation_domain' => 'admin',]
59
+                ['attr' => ['class' => 'btn btn-default btn-primary btn-edit', ], 'label' => 'Edit',
60
+                    'translation_domain' => 'admin', ]
61 61
             );
62 62
         }
63 63
     }
Please login to merge, or discard this patch.