Completed
Push — Order ( a8dbff...a1a9f7 )
by Laurent
03:52
created
src/AppBundle/Helper/ControllerHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,6 +114,6 @@
 block discarded – undo
114 114
     {
115 115
         $session = new Session();
116 116
 
117
-        return $session->has('sort.' . $name) ? $session->get('sort.' . $name) : null;
117
+        return $session->has('sort.'.$name) ? $session->get('sort.'.$name) : null;
118 118
     }
119 119
 }
Please login to merge, or discard this patch.
src/AppBundle/Controller/AbstractController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@
 block discarded – undo
223 223
      * @param Object $entity     Entity
224 224
      * @param \Symfony\Component\HttpFoundation\Request $request   Request in progress
225 225
      * @param string $entityName Name of Entity
226
-     * @return array
226
+     * @return \Symfony\Component\HttpFoundation\RedirectResponse
227 227
      */
228 228
     public function abstractDeleteWithArticlesAction($entity, Request $request, $entityName)
229 229
     {
Please login to merge, or discard this patch.
src/AppBundle/Controller/AbstractOrdersController.php 3 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 $entityName Name of Entity
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                                    $entityName Name of Entity
75 75
      * @param string                                    $typePath   Path of FormType
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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 [$entityName => $entity, 'edit_form' => $editForm->createView(),];
66
+        return [$entityName => $entity, 'edit_form' => $editForm->createView(), ];
67 67
     }
68 68
 
69 69
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $return = [$entityName => $entity, 'edit_form'   => $editForm->createView(), ];
90 90
 
91 91
         if ($editForm->isValid()) {
92
-            if ($entityName === 'deliveries'){
92
+            if ($entityName === 'deliveries') {
93 93
                 $entity->setStatus(2);
94 94
                 $this->updateDeliveryArticles($entity, $etm);
95 95
             } 
@@ -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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         $return = [$entityName => $entity, 'edit_form'   => $editForm->createView(), ];
90 90
 
91 91
         if ($editForm->isValid()) {
92
-            if ($entityName === 'deliveries'){
92
+            if ($entityName === 'deliveries') {
93 93
                 $entity->setStatus(2);
94 94
                 $this->updateDeliveryArticles($entity, $etm);
95 95
             } 
Please login to merge, or discard this patch.