@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | Select2ComboBoxType::class, |
60 | 60 | [ |
61 | 61 | 'choices' => $this->extractAttributeValuesFromTransfer($options[static::OPTION_PRODUCT_MANAGEMENT_ATTRIBUTE_TRANSFER]), |
62 | - 'choice_label' => function ($choiceValue) { |
|
62 | + 'choice_label' => function($choiceValue) { |
|
63 | 63 | return $choiceValue; |
64 | 64 | }, |
65 | 65 | 'label' => false, |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | protected function extractAttributeValuesFromTransfer(ProductManagementAttributeTransfer $productManagementAttributeTransfer) |
120 | 120 | { |
121 | - return array_map(function (ProductManagementAttributeValueTransfer $productManagementAttributeValueTransfer) { |
|
121 | + return array_map(function(ProductManagementAttributeValueTransfer $productManagementAttributeValueTransfer) { |
|
122 | 122 | return $productManagementAttributeValueTransfer->getValue(); |
123 | 123 | }, $productManagementAttributeTransfer->getValues()->getArrayCopy()); |
124 | 124 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ], |
92 | 92 | ]); |
93 | 93 | |
94 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($options) { |
|
94 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($options) { |
|
95 | 95 | $formData = $event->getData(); |
96 | 96 | |
97 | 97 | if (!empty($formData[static::FIELD_SKU_AUTOGENERATE_CHECKBOX])) { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | { |
192 | 192 | return array_filter( |
193 | 193 | $this->getFactory()->createProductConcreteSuperAttributeFilterHelper()->getTransformedSubmittedSuperAttributes($submittedAttributes), |
194 | - function ($submittedAttribute) { |
|
194 | + function($submittedAttribute) { |
|
195 | 195 | return $submittedAttribute !== null && $submittedAttribute !== ''; |
196 | 196 | } |
197 | 197 | ); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | protected function getAttributeCombinationsFromConcreteProducts(array $concreteProducts) |
58 | 58 | { |
59 | - return array_map(function (ProductConcreteTransfer $productConcreteTransfer) { |
|
59 | + return array_map(function(ProductConcreteTransfer $productConcreteTransfer) { |
|
60 | 60 | return $productConcreteTransfer->getAttributes(); |
61 | 61 | }, $concreteProducts); |
62 | 62 | } |
@@ -65,8 +65,7 @@ |
||
65 | 65 | ->saveProduct($productAbstractTransfer, [$productConcreteTransfer]); |
66 | 66 | |
67 | 67 | $type = $productConcreteTransfer->getProductBundle() === null ? |
68 | - ProductManagementConfig::PRODUCT_TYPE_REGULAR : |
|
69 | - ProductManagementConfig::PRODUCT_TYPE_BUNDLE; |
|
68 | + ProductManagementConfig::PRODUCT_TYPE_REGULAR : ProductManagementConfig::PRODUCT_TYPE_BUNDLE; |
|
70 | 69 | |
71 | 70 | $this->getFactory() |
72 | 71 | ->getProductFacade() |
@@ -39,7 +39,7 @@ |
||
39 | 39 | return false; |
40 | 40 | } |
41 | 41 | |
42 | - $mappingFunction = function (ProductOptionTransfer $productOptionTransfer) { |
|
42 | + $mappingFunction = function(ProductOptionTransfer $productOptionTransfer) { |
|
43 | 43 | return $productOptionTransfer->getIdProductOptionValue(); |
44 | 44 | }; |
45 | 45 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | foreach ($actualResult->getProductOptions() as $productOptionTransfer) { |
62 | 62 | $this->assertContains( |
63 | 63 | $productOptionTransfer->getValue(), |
64 | - array_map(function (ProductOptionValueTransfer $productOptionValueTransfer) { |
|
64 | + array_map(function(ProductOptionValueTransfer $productOptionValueTransfer) { |
|
65 | 65 | return $productOptionValueTransfer->getValue(); |
66 | 66 | }, $productOptionGroupTransfer->getProductOptionValues()->getArrayCopy()) |
67 | 67 | ); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | foreach ($actualResult->getProductOptions() as $productOptionTransfer) { |
100 | 100 | $this->assertContains( |
101 | 101 | $productOptionTransfer->getValue(), |
102 | - array_map(function (ProductOptionValueTransfer $productOptionValueTransfer) { |
|
102 | + array_map(function(ProductOptionValueTransfer $productOptionValueTransfer) { |
|
103 | 103 | return $productOptionValueTransfer->getValue(); |
104 | 104 | }, $productOptionGroupTransfer->getProductOptionValues()->getArrayCopy()) |
105 | 105 | ); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function updateShoppingListSharedEntities(ShoppingListTransfer $shoppingListTransfer): ShoppingListShareResponseTransfer |
121 | 121 | { |
122 | - $this->getTransactionHandler()->handleTransaction(function () use ($shoppingListTransfer) { |
|
122 | + $this->getTransactionHandler()->handleTransaction(function() use ($shoppingListTransfer) { |
|
123 | 123 | $this->executeUpdateShoppingListSharedEntitiesTransaction($shoppingListTransfer); |
124 | 124 | }); |
125 | 125 | |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | } |
296 | 296 | |
297 | 297 | return $this->getTransactionHandler()->handleTransaction( |
298 | - function () use ($idCompanyBusinessUnit) { |
|
298 | + function() use ($idCompanyBusinessUnit) { |
|
299 | 299 | return $this->executeRemoveShoppingListCompanyBusinessUnitTransaction($idCompanyBusinessUnit); |
300 | 300 | } |
301 | 301 | ); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $customerFacade = $this->getFactory()->getCustomerFacade(); |
255 | 255 | |
256 | 256 | $emailConstraints[] = new Callback([ |
257 | - 'callback' => function ($email, ExecutionContextInterface $context) use ($customerFacade) { |
|
257 | + 'callback' => function($email, ExecutionContextInterface $context) use ($customerFacade) { |
|
258 | 258 | if ($customerFacade->hasEmail($email)) { |
259 | 259 | $context->addViolation('Email is already used'); |
260 | 260 | } |
@@ -282,12 +282,12 @@ discard block |
||
282 | 282 | protected function createDateTimeModelTransformer(): CallbackTransformer |
283 | 283 | { |
284 | 284 | return new CallbackTransformer( |
285 | - function ($dateAsString) { |
|
285 | + function($dateAsString) { |
|
286 | 286 | if ($dateAsString !== null) { |
287 | 287 | return new DateTime($dateAsString); |
288 | 288 | } |
289 | 289 | }, |
290 | - function ($dateAsObject) { |
|
290 | + function($dateAsObject) { |
|
291 | 291 | return $dateAsObject; |
292 | 292 | } |
293 | 293 | ); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $companyRoleCollectionConstraints = []; |
101 | 101 | |
102 | 102 | $companyRoleCollectionConstraints[] = new Callback([ |
103 | - 'callback' => function (CompanyRoleCollectionTransfer $companyRoleCollectionTransfer, ExecutionContextInterface $context) { |
|
103 | + 'callback' => function(CompanyRoleCollectionTransfer $companyRoleCollectionTransfer, ExecutionContextInterface $context) { |
|
104 | 104 | if (!$companyRoleCollectionTransfer->getRoles()->count()) { |
105 | 105 | $context->addViolation('At least one role must be assigned to a user.'); |
106 | 106 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | protected function getInputDataCallbackRoleCollectionTransformer(): Closure |
117 | 117 | { |
118 | - return function ($roleCollection = []): array { |
|
118 | + return function($roleCollection = []): array { |
|
119 | 119 | $roles = []; |
120 | 120 | |
121 | 121 | if (!empty($roleCollection[CompanyRoleCollectionTransfer::ROLES])) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | protected function getOutputDataCallbackRoleCollectionTransformer(): Closure |
135 | 135 | { |
136 | - return function ($roleCollectionSubmitted = []): CompanyRoleCollectionTransfer { |
|
136 | + return function($roleCollectionSubmitted = []): CompanyRoleCollectionTransfer { |
|
137 | 137 | $companyRoleCollectionTransfer = new CompanyRoleCollectionTransfer(); |
138 | 138 | |
139 | 139 | foreach ($roleCollectionSubmitted as $role) { |