| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function create(ShipmentInterface $shipment, string $locale): ShipmentView |
||
| 29 | { |
||
| 30 | /** @var OrderInterface $order */ |
||
| 31 | $order = $shipment->getOrder(); |
||
| 32 | |||
| 33 | /** @var ShipmentView $shipmentView */ |
||
| 34 | $shipmentView = new $this->shipmentViewClass(); |
||
| 35 | |||
| 36 | $shipmentView->state = $shipment->getState(); |
||
| 37 | $shipmentView->method = $this->shippingMethodViewFactory->create($shipment, $locale, $order->getCurrencyCode()); |
||
| 38 | |||
| 39 | return $shipmentView; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |