| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function create(OrderItemInterface $item, ChannelInterface $channel, $locale) |
||
| 37 | { |
||
| 38 | $itemView = new ItemView(); |
||
| 39 | |||
| 40 | $itemView->id = $item->getId(); |
||
| 41 | $itemView->quantity = $item->getQuantity(); |
||
| 42 | $itemView->total = $item->getTotal(); |
||
| 43 | $itemView->product = $this->productViewFactory->create($item->getProduct(), $locale); |
||
| 44 | $itemView->product->variants = [$this->productVariantViewFactory->create($item->getVariant(), $channel, $locale)]; |
||
| 45 | |||
| 46 | return $itemView; |
||
| 47 | } |
||
| 48 | } |
||
| 49 |