Skip to content

Commit 90ca5f0

Browse files
committed
Applied more relevant name for property optionGroupsToTypes (#24726)
1 parent 20b0f26 commit 90ca5f0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/code/Magento/Catalog/Model/Product/Option.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
111111
/**
112112
* @var string[]
113113
*/
114-
private $optionGroupsToTypes;
114+
private $optionTypesToGroups;
115115

116116
/**
117117
* @var MetadataPool
@@ -137,7 +137,7 @@ class Option extends AbstractExtensibleModel implements ProductCustomOptionInter
137137
* @param array $data
138138
* @param ProductCustomOptionValuesInterfaceFactory|null $customOptionValuesFactory
139139
* @param array $optionGroups
140-
* @param array $optionGroupsToTypes
140+
* @param array $optionTypesToGroups
141141
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
142142
*/
143143
public function __construct(
@@ -154,7 +154,7 @@ public function __construct(
154154
array $data = [],
155155
ProductCustomOptionValuesInterfaceFactory $customOptionValuesFactory = null,
156156
array $optionGroups = [],
157-
array $optionGroupsToTypes = []
157+
array $optionTypesToGroups = []
158158
) {
159159
$this->productOptionValue = $productOptionValue;
160160
$this->optionTypeFactory = $optionFactory;
@@ -168,7 +168,7 @@ public function __construct(
168168
self::OPTION_GROUP_SELECT => Select::class,
169169
self::OPTION_GROUP_TEXT => Text::class,
170170
];
171-
$this->optionGroupsToTypes = $optionGroupsToTypes ?: [
171+
$this->optionTypesToGroups = $optionTypesToGroups ?: [
172172
self::OPTION_TYPE_FIELD => self::OPTION_GROUP_TEXT,
173173
self::OPTION_TYPE_AREA => self::OPTION_GROUP_TEXT,
174174
self::OPTION_TYPE_FILE => self::OPTION_GROUP_FILE,
@@ -352,7 +352,7 @@ public function getGroupByType($type = null): string
352352
$type = $this->getType();
353353
}
354354

355-
return $this->optionGroupsToTypes[$type] ?? '';
355+
return $this->optionTypesToGroups[$type] ?? '';
356356
}
357357

358358
/**

app/code/Magento/Catalog/etc/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
<item name="select" xsi:type="string">Magento\Catalog\Model\Product\Option\Type\Select</item>
420420
<item name="text" xsi:type="string">Magento\Catalog\Model\Product\Option\Type\Text</item>
421421
</argument>
422-
<argument name="optionGroupsToTypes" xsi:type="array">
422+
<argument name="optionTypesToGroups" xsi:type="array">
423423
<item name="field" xsi:type="const">Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_GROUP_TEXT</item>
424424
<item name="area" xsi:type="const">Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_GROUP_TEXT</item>
425425
<item name="file" xsi:type="const">Magento\Catalog\Api\Data\ProductCustomOptionInterface::OPTION_GROUP_FILE</item>

0 commit comments

Comments
 (0)