@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | if ($productVariant) { |
80 | 80 | $cartItemView->product_option->extension_attributes->configurable_item_options = $productVariant->getOptionValues()->map( |
81 | - static function (ProductOptionValueInterface $productOptionValue) { |
|
81 | + static function(ProductOptionValueInterface $productOptionValue) { |
|
82 | 82 | return [ |
83 | 83 | 'option_value' => $productOptionValue->getId(), |
84 | 84 | 'option_id' => (string) $productOptionValue->getOption()->getId(), |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | |
119 | 119 | if ($productVariant) { |
120 | 120 | $cartItemView->product_option->extension_attributes->configurable_item_options = $productVariant->getOptionValues()->map( |
121 | - static function (ProductOptionValueInterface $productOptionValue) { |
|
121 | + static function(ProductOptionValueInterface $productOptionValue) { |
|
122 | 122 | return [ |
123 | 123 | 'option_value' => $productOptionValue->getId(), |
124 | 124 | 'option_id' => (string) $productOptionValue->getOption()->getId(), |
@@ -35,8 +35,8 @@ |
||
35 | 35 | public function toArray(): array |
36 | 36 | { |
37 | 37 | return [ |
38 | - self::CATEGORY => $this->entities, |
|
39 | - self::CATEGORY_IDS => $this->ids, |
|
38 | + self::CATEGORY => $this->entities, |
|
39 | + self::CATEGORY_IDS => $this->ids, |
|
40 | 40 | ]; |
41 | 41 | } |
42 | 42 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | /** @var ProductVariantInterface $productVariant */ |
36 | 36 | foreach ($product->getVariants() as $productVariant) { |
37 | 37 | $productVariantOptionValues = $productVariant->getOptionValues()->map( |
38 | - static function (ProductOptionValueInterface $productOptionValue) { |
|
38 | + static function(ProductOptionValueInterface $productOptionValue) { |
|
39 | 39 | return [ |
40 | 40 | 'option_value' => $productOptionValue->getId(), |
41 | 41 | 'option_id' => (string) $productOptionValue->getOption()->getId(), |
@@ -40,11 +40,11 @@ |
||
40 | 40 | $product->getVariants()->first()->getTaxCategory() !== null ? $product->getVariants()->first()->getTaxCategory()->getName() : null, |
41 | 41 | $product->getDescription(), |
42 | 42 | $product->getShortDescription(), |
43 | - 1,//hasOptions |
|
44 | - 1,//requiredOptions |
|
45 | - [],//productLinks |
|
46 | - [],//colorOptions, |
|
47 | - [],//sizeOptions |
|
43 | + 1, //hasOptions |
|
44 | + 1, //requiredOptions |
|
45 | + [], //productLinks |
|
46 | + [], //colorOptions, |
|
47 | + [], //sizeOptions |
|
48 | 48 | $productVariantsCount === 1 ? $product->getVariants()->first()->getCode() : $product->getCode() |
49 | 49 | ); |
50 | 50 | } |