Completed
Push — Recipes ( f95f7d...931021 )
by Laurent
04:11
created
src/AppBundle/Controller/InventoryController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      */
288 288
     public function printAction(Inventory $inventory)
289 289
     {
290
-        $file = $inventory->getDate()->format('Ymd') . '-inventory.pdf';
290
+        $file = $inventory->getDate()->format('Ymd').'-inventory.pdf';
291 291
         // Create and save the PDF file to print
292 292
         $html = $this->renderView(
293 293
             'AppBundle:Inventory:print.pdf.twig',
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
                     ->getArray((string) $inventory->getDate()->format('d/m/Y'), '- Inventaire -')
301 301
             ),
302 302
             200,
303
-            ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="' . $file . '"',]
303
+            ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="'.$file.'"', ]
304 304
         );
305 305
     }
306 306
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
                     ->getArray((string) $inventory->getDate()->format('d/m/Y'), '- Inventaire -')
327 327
             ),
328 328
             200,
329
-            ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="prepare.pdf"',]
329
+            ['Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="prepare.pdf"', ]
330 330
         );
331 331
     }
332 332
 
Please login to merge, or discard this patch.
src/AppBundle/Form/Type/OrdersArticlesType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                     'empty_data' => '0,000',
69 69
                     'label' => 'settings.quantity',
70 70
                     'translation_domain' => 'gs_articles',
71
-                    'attr'=> ['class' => 'form-control text-right',],
71
+                    'attr'=> ['class' => 'form-control text-right', ],
72 72
                 )
73 73
             )
74 74
             ->add(
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                     'currency' => 'EUR',
93 93
                     'label' => 'settings.price',
94 94
                     'translation_domain' => 'gs_articles',
95
-                    'attr'=> ['class' => 'form-control text-right', 'readonly' => true,],
95
+                    'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ],
96 96
                 )
97 97
             )
98 98
             ->add(
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                     'label' => 'seizure.total',
119 119
                     'translation_domain' => 'gs_orders',
120 120
                     'mapped' => false,
121
-                    'attr'=> ['class' => 'form-control text-right', 'readonly' => true,]
121
+                    'attr'=> ['class' => 'form-control text-right', 'readonly' => true, ]
122 122
                 )
123 123
             )
124 124
         ;
Please login to merge, or discard this patch.
src/AppBundle/Controller/UserController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
     public function createAction(Request $request)
100 100
     {
101 101
         $user = new User();
102
-        $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'),]);
102
+        $form = $this->createForm(UserType::class, $user, ['action' => $this->generateUrl('user_create'), ]);
103 103
         $form->handleRequest($request);
104
-        $return = ['user' => $user, 'form'   => $form->createView(),];
104
+        $return = ['user' => $user, 'form'   => $form->createView(), ];
105 105
 
106 106
         if ($form->isValid()) {
107 107
             $return = $this->validUser($user, 'create');
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $editForm->handleRequest($request);
162 162
         $return = ['user' => $user,
163 163
             'edit_form' => $editForm->createView(),
164
-            'delete_form' => $deleteForm->createView(),];
164
+            'delete_form' => $deleteForm->createView(), ];
165 165
 
166 166
         if ($editForm->isValid()) {
167 167
             $return = $this->validUser($user, 'edit');
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         }
241 241
         $userManager = $this->get('fos_user.user_manager');
242 242
         $userManager->updateUser($user);
243
-        $this->addFlash('info', 'gestock.' . $action . '.ok');
243
+        $this->addFlash('info', 'gestock.'.$action.'.ok');
244 244
 
245 245
         if ($action === 'create') {
246 246
             $return = $this->redirectToRoute('user_show', ['id' => $user->getId()]);
Please login to merge, or discard this patch.
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   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $this->addRolesAction($form, $entityNew);
122 122
         }
123 123
         $form->handleRequest($request);
124
-        $return = [$entityName => $entityNew, 'form' => $form->createView(),];
124
+        $return = [$entityName => $entityNew, 'form' => $form->createView(), ];
125 125
 
126 126
         if ($form->isValid()) {
127 127
             $etm = $this->getDoctrine()->getManager();
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
     public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName, $prefixRoute)
232 232
     {
233 233
         $etm = $this->getDoctrine()->getManager();
234
-        $form = $this->createDeleteForm($entity->getId(), $prefixRoute . '_delete');
234
+        $form = $this->createDeleteForm($entity->getId(), $prefixRoute.'_delete');
235 235
         $entityArticles = $etm
236
-            ->getRepository('AppBundle:' .  $entityName . 'Articles')
236
+            ->getRepository('AppBundle:'.$entityName.'Articles')
237 237
             ->findBy([$prefixRoute => $entity->getId()]);
238 238
 
239 239
         if ($form->handleRequest($request)->isValid()) {
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             } else {
269 269
                 $alias = current($qbd->getDQLPart('from'))->getAlias();
270 270
             }
271
-            $qbd->orderBy($alias . '.' . $order['field'], $order['type']);
271
+            $qbd->orderBy($alias.'.'.$order['field'], $order['type']);
272 272
         }
273 273
     }
274 274
 
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.