Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 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 | $channelDeposit = $variant->getChannelDepositForChannel($channel); |
||
36 | if ($channelDeposit) { |
||
37 | $optionMap['value'] = $channelDeposit->getPrice(); |
||
38 | } |
||
39 | |||
40 | return $optionMap; |
||
41 | } |
||
43 |