@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function boot(Application $app) |
39 | 39 | { |
40 | - $app->before(function (Request $request) { |
|
40 | + $app->before(function(Request $request) { |
|
41 | 41 | $this->assertMatchingHostName($request); |
42 | 42 | }, Application::EARLY_EVENT); |
43 | 43 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | */ |
38 | 38 | public function boot(Application $app) |
39 | 39 | { |
40 | - $app->before(function (Request $request) { |
|
40 | + $app->before(function(Request $request) { |
|
41 | 41 | $this->assertMatchingHostName($request); |
42 | 42 | }, Application::EARLY_EVENT); |
43 | 43 | } |
@@ -66,14 +66,14 @@ |
||
66 | 66 | |
67 | 67 | $builder->addEventListener( |
68 | 68 | FormEvents::PRE_SET_DATA, |
69 | - function (FormEvent $event) use ($options) { |
|
69 | + function(FormEvent $event) use ($options) { |
|
70 | 70 | $this->convertIntToMoney($event, $options); |
71 | 71 | } |
72 | 72 | ); |
73 | 73 | |
74 | 74 | $builder->addEventListener( |
75 | 75 | FormEvents::SUBMIT, |
76 | - function (FormEvent $event) use ($options) { |
|
76 | + function(FormEvent $event) use ($options) { |
|
77 | 77 | $this->convertMoneyToInt($event, $options); |
78 | 78 | } |
79 | 79 | ); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | { |
39 | 39 | /** @var \Symfony\Component\OptionsResolver\OptionsResolver $resolver */ |
40 | 40 | $resolver->setDefaults([ |
41 | - 'validation_groups' => function (FormInterface $form) { |
|
41 | + 'validation_groups' => function(FormInterface $form) { |
|
42 | 42 | $validationGroups = [Constraint::DEFAULT_GROUP, static::GROUP_SHIPPING_ADDRESS]; |
43 | 43 | |
44 | 44 | if (!$form->get(static::FIELD_BILLING_SAME_AS_SHIPPING)->getData()) { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'data_class' => AddressTransfer::class, |
81 | 81 | 'allow_extra_fields' => true, |
82 | 82 | 'required' => false, |
83 | - 'validation_groups' => function (FormInterface $form) { |
|
83 | + 'validation_groups' => function(FormInterface $form) { |
|
84 | 84 | if (!$form->has(AddressSelectionType::FIELD_ID_CUSTOMER_ADDRESS) || !$form->get(AddressSelectionType::FIELD_ID_CUSTOMER_ADDRESS)->getData()) { |
85 | 85 | return [static::GROUP_SHIPPING_ADDRESS]; |
86 | 86 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $options = [ |
127 | 127 | 'data_class' => AddressTransfer::class, |
128 | 128 | 'allow_extra_fields' => true, |
129 | - 'validation_groups' => function (FormInterface $form) { |
|
129 | + 'validation_groups' => function(FormInterface $form) { |
|
130 | 130 | if ($form->getParent()->get(static::FIELD_BILLING_SAME_AS_SHIPPING)->getData()) { |
131 | 131 | return false; |
132 | 132 | } |
@@ -91,7 +91,7 @@ |
||
91 | 91 | protected function createBirthdayConstraint() |
92 | 92 | { |
93 | 93 | return new Callback([ |
94 | - 'callback' => function ($date, ExecutionContextInterface $context) { |
|
94 | + 'callback' => function($date, ExecutionContextInterface $context) { |
|
95 | 95 | if (strtotime($date) > strtotime(static::MIN_BIRTHDAY_DATE_STRING)) { |
96 | 96 | $context->addViolation('Must be older than 18 years'); |
97 | 97 | } |
@@ -161,7 +161,7 @@ |
||
161 | 161 | $this->addPublishEvents(CategoryEvents::CATEGORY_TREE_PUBLISH, $categoryNodeEntity->getIdCategoryNode()); |
162 | 162 | } |
163 | 163 | |
164 | - $convertCallback = function ($value) { |
|
164 | + $convertCallback = function($value) { |
|
165 | 165 | return mb_strtolower(str_replace(' ', '-', $value)); |
166 | 166 | }; |
167 | 167 | $urlPathParts = array_map($convertCallback, $urlPathParts); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function getItemsWithBundlesItems(QuoteTransfer $quoteTransfer): array |
31 | 31 | { |
32 | 32 | $items = $this->getGroupedBundleItems($quoteTransfer->getItems(), $quoteTransfer->getBundleItems()); |
33 | - $items = array_map(function ($groupedItem) { |
|
33 | + $items = array_map(function($groupedItem) { |
|
34 | 34 | if ($groupedItem instanceof ItemTransfer) { |
35 | 35 | return $groupedItem; |
36 | 36 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | { |
127 | 127 | usort( |
128 | 128 | $options, |
129 | - function (ProductOptionTransfer $productOptionLeft, ProductOptionTransfer $productOptionRight) { |
|
129 | + function(ProductOptionTransfer $productOptionLeft, ProductOptionTransfer $productOptionRight) { |
|
130 | 130 | return ($productOptionLeft->getSku() < $productOptionRight->getSku()) ? -1 : 1; |
131 | 131 | } |
132 | 132 | ); |
@@ -9,12 +9,12 @@ |
||
9 | 9 | |
10 | 10 | interface ProductMeasurementUnitEvents |
11 | 11 | { |
12 | - /** |
|
13 | - * Specification: |
|
14 | - * - This event is used for product_measurement_unit publishing. |
|
15 | - * |
|
16 | - * @api |
|
17 | - */ |
|
12 | + /** |
|
13 | + * Specification: |
|
14 | + * - This event is used for product_measurement_unit publishing. |
|
15 | + * |
|
16 | + * @api |
|
17 | + */ |
|
18 | 18 | public const PRODUCT_MEASUREMENT_UNIT_PUBLISH = 'ProductMeasurementUnit.product_measurement_unit.publish'; |
19 | 19 | |
20 | 20 | /** |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $builder->get(ProductConcreteTransfer::COMPANY_SUPPLIERS)->addModelTransformer( |
78 | 78 | new CallbackTransformer( |
79 | - function ($suppliers) { |
|
79 | + function($suppliers) { |
|
80 | 80 | if (empty($suppliers)) { |
81 | 81 | return $suppliers; |
82 | 82 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | |
89 | 89 | return $result; |
90 | 90 | }, |
91 | - function ($data) { |
|
91 | + function($data) { |
|
92 | 92 | $suppliers = []; |
93 | 93 | foreach ($data as $id) { |
94 | 94 | $suppliers[] = (new SpyCompanyEntityTransfer()) |