| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 39 | public function getDefaultShippingMethod(ShipmentInterface $shipment) |
||
| 40 | { |
||
| 41 | $shippingMethods = $this->shippingMethodRepository->findBy(['enabled' => true]); |
||
| 42 | if (empty($shippingMethods)) { |
||
| 43 | throw new UnresolvedDefaultShippingMethodException(); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $shippingMethods[0]; |
||
| 47 | } |
||
| 48 | } |
||
| 49 |