@@ -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 | |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | throw new RuntimeException('$context must be a Part object!'); |
| 81 | 81 | } |
| 82 | 82 | $tmp = ''; |
| 83 | - $attachments = $context->getAttachments()->filter(function (Attachment $attachment) { |
|
| 83 | + $attachments = $context->getAttachments()->filter(function(Attachment $attachment) { |
|
| 84 | 84 | return $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment); |
| 85 | 85 | }); |
| 86 | 86 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $dataTable->add('picture', TextColumn::class, [ |
| 81 | 81 | 'label' => '', |
| 82 | - 'render' => function ($value, Attachment $context) { |
|
| 82 | + 'render' => function($value, Attachment $context) { |
|
| 83 | 83 | if ($context->isPicture() |
| 84 | 84 | && !$context->isExternal() |
| 85 | 85 | && $this->attachmentHelper->isFileExisting($context)) { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $dataTable->add('name', TextColumn::class, [ |
| 106 | 106 | 'label' => 'attachment.edit.name', |
| 107 | - 'render' => function ($value, Attachment $context) { |
|
| 107 | + 'render' => function($value, Attachment $context) { |
|
| 108 | 108 | //Link to external source |
| 109 | 109 | if ($context->isExternal()) { |
| 110 | 110 | return sprintf( |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | $dataTable->add('attachment_type', TextColumn::class, [ |
| 130 | 130 | 'label' => 'attachment.table.type', |
| 131 | 131 | 'field' => 'attachment_type.name', |
| 132 | - 'render' => function ($value, Attachment $context) { |
|
| 132 | + 'render' => function($value, Attachment $context) { |
|
| 133 | 133 | return sprintf( |
| 134 | 134 | '<a href="%s">%s</a>', |
| 135 | 135 | $this->entityURLGenerator->editURL($context->getAttachmentType()), |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $dataTable->add('element', TextColumn::class, [ |
| 142 | 142 | 'label' => 'attachment.table.element', |
| 143 | 143 | //'propertyPath' => 'element.name', |
| 144 | - 'render' => function ($value, Attachment $context) { |
|
| 144 | + 'render' => function($value, Attachment $context) { |
|
| 145 | 145 | return sprintf( |
| 146 | 146 | '<a href="%s">%s</a>', |
| 147 | 147 | $this->entityURLGenerator->infoURL($context->getElement()), |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | $dataTable->add('filesize', TextColumn::class, [ |
| 159 | 159 | 'label' => $this->translator->trans('attachment.table.filesize'), |
| 160 | - 'render' => function ($value, Attachment $context) { |
|
| 160 | + 'render' => function($value, Attachment $context) { |
|
| 161 | 161 | if ($this->attachmentHelper->isFileExisting($context)) { |
| 162 | 162 | return $this->attachmentHelper->getHumanFileSize($context); |
| 163 | 163 | } |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | $dataTable->createAdapter(ORMAdapter::class, [ |
| 223 | 223 | 'entity' => Attachment::class, |
| 224 | - 'query' => function (QueryBuilder $builder): void { |
|
| 224 | + 'query' => function(QueryBuilder $builder): void { |
|
| 225 | 225 | $this->getQuery($builder); |
| 226 | 226 | }, |
| 227 | 227 | ]); |
@@ -101,7 +101,7 @@ |
||
| 101 | 101 | { |
| 102 | 102 | $em = $this->em; |
| 103 | 103 | |
| 104 | - $this->execute($element, static function (AbstractStructuralDBElement $element) use ($em): void { |
|
| 104 | + $this->execute($element, static function(AbstractStructuralDBElement $element) use ($em): void { |
|
| 105 | 105 | $em->remove($element); |
| 106 | 106 | }); |
| 107 | 107 | |