| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function process(BaseOrderInterface $order) |
||
| 42 | { |
||
| 43 | /** @var OrderInterface $order */ |
||
| 44 | Assert::isInstanceOf($order, OrderInterface::class); |
||
| 45 | $channel = $order->getChannel(); |
||
| 46 | |||
| 47 | foreach ($order->getItems() as $item) { |
||
| 48 | if ($item->isImmutable()) { |
||
| 49 | continue; |
||
| 50 | } |
||
| 51 | |||
| 52 | $item->setUnitPrice($this->productVariantPriceCalculator->calculate( |
||
| 53 | $item->getVariant(), |
||
| 54 | ['channel' => $channel] |
||
| 55 | )); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.