@@ -226,7 +226,7 @@ |
||
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 | { |
@@ -121,7 +121,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
@@ -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:' . $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 | } |
@@ -69,7 +69,7 @@ |
||
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 | { |
@@ -50,13 +50,13 @@ discard block |
||
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 |
||
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 |