| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | private function constructOptionsMap(ProductVariantInterface $variant, ChannelInterface $channel): array |
||
| 27 | { |
||
| 28 | $optionMap = []; |
||
| 29 | |||
| 30 | /** @var ProductOptionValueInterface $option */ |
||
| 31 | foreach ($variant->getOptionValues() as $option) { |
||
| 32 | $optionMap[$option->getOptionCode() ?? ''] = $option->getCode(); |
||
| 33 | } |
||
| 34 | |||
| 35 | $depositPrice = $variant->getDepositPriceByChannel($channel); |
||
| 36 | if ($depositPrice !== null) { |
||
| 37 | $optionMap['value'] = $depositPrice; |
||
| 38 | } |
||
| 39 | |||
| 40 | return $optionMap; |
||
| 41 | } |
||
| 43 |