@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * @Route("/{id}/clone", name="footprint_clone") |
| 90 | 90 | * @Route("/") |
| 91 | 91 | */ |
| 92 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Footprint $entity = null): Response |
|
| 92 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Footprint $entity = null) : Response |
|
| 93 | 93 | { |
| 94 | 94 | return $this->_new($request, $em, $importer, $entity); |
| 95 | 95 | } |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | * @Route("/{id}/clone", name="store_location_clone") |
| 92 | 92 | * @Route("/") |
| 93 | 93 | */ |
| 94 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Storelocation $entity = null): Response |
|
| 94 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Storelocation $entity = null) : Response |
|
| 95 | 95 | { |
| 96 | 96 | return $this->_new($request, $em, $importer, $entity); |
| 97 | 97 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | * @Route("/{id}/clone", name="supplier_clone") |
| 93 | 93 | * @Route("/") |
| 94 | 94 | */ |
| 95 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Supplier $entity = null): Response |
|
| 95 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Supplier $entity = null) : Response |
|
| 96 | 96 | { |
| 97 | 97 | return $this->_new($request, $em, $importer, $entity); |
| 98 | 98 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * @Route("/{id}/clone", name="label_profile_clone") |
| 90 | 90 | * @Route("/") |
| 91 | 91 | */ |
| 92 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null): Response |
|
| 92 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null) : Response |
|
| 93 | 93 | { |
| 94 | 94 | return $this->_new($request, $em, $importer, $entity); |
| 95 | 95 | } |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * @Route("/{id}/clone", name="category_clone") |
| 90 | 90 | * @Route("/") |
| 91 | 91 | */ |
| 92 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Category $entity = null): Response |
|
| 92 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?Category $entity = null) : Response |
|
| 93 | 93 | { |
| 94 | 94 | return $this->_new($request, $em, $importer, $entity); |
| 95 | 95 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | ]); |
| 100 | 100 | |
| 101 | 101 | //Add pricedetails after we know the data, so we can set the default currency |
| 102 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options): void { |
|
| 102 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options): void { |
|
| 103 | 103 | /** @var Orderdetail $orderdetail */ |
| 104 | 104 | $orderdetail = $event->getData(); |
| 105 | 105 | |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | public function buildForm(FormBuilderInterface $builder, array $options): void |
| 66 | 66 | { |
| 67 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event): void { |
|
| 67 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event): void { |
|
| 68 | 68 | $form = $event->getForm(); |
| 69 | 69 | /** @var User $user */ |
| 70 | 70 | $user = $event->getData(); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ], |
| 170 | 170 | ]); |
| 171 | 171 | |
| 172 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event): void { |
|
| 172 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event): void { |
|
| 173 | 173 | $form = $event->getForm(); |
| 174 | 174 | $attachment = $form->getData(); |
| 175 | 175 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | //Check the secure file checkbox, if file is in securefile location |
| 189 | 189 | $builder->get('secureFile')->addEventListener( |
| 190 | 190 | FormEvents::PRE_SET_DATA, |
| 191 | - function (FormEvent $event): void { |
|
| 191 | + function(FormEvent $event): void { |
|
| 192 | 192 | $attachment = $event->getForm()->getParent()->getData(); |
| 193 | 193 | if ($attachment instanceof Attachment) { |
| 194 | 194 | $event->setData($attachment->isSecure()); |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | 'class' => 'selectpicker', |
| 66 | 66 | 'title' => 'selectpicker.nothing_selected', |
| 67 | 67 | ], |
| 68 | - 'choice_attr' => function (Options $options) { |
|
| 69 | - return function ($choice, $key, $value) use ($options) { |
|
| 68 | + 'choice_attr' => function(Options $options) { |
|
| 69 | + return function($choice, $key, $value) use ($options) { |
|
| 70 | 70 | /** @var Attachment $choice */ |
| 71 | 71 | $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL']; |
| 72 | 72 | |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | }; |
| 81 | 81 | }, |
| 82 | 82 | 'choice_label' => 'name', |
| 83 | - 'choice_loader' => function (Options $options) { |
|
| 84 | - return new CallbackChoiceLoader(function () use ($options) { |
|
| 83 | + 'choice_loader' => function(Options $options) { |
|
| 84 | + return new CallbackChoiceLoader(function() use ($options) { |
|
| 85 | 85 | $entity = $options['entity']; |
| 86 | 86 | if (!$entity instanceof AttachmentContainingDBElement) { |
| 87 | 87 | throw new \RuntimeException('$entity must have Attachments! (be of type AttachmentContainingDBElement)'); |