Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | public function getShippingMethodByName($shippingMethodName) |
||
41 | { |
||
42 | $shippingMethod = $this->shippingMethodRepository->findOneBy(['name' => $shippingMethodName]); |
||
43 | if (null === $shippingMethod) { |
||
44 | throw new \Exception('Shipping method with name "'.$shippingMethodName.'" does not exist'); |
||
45 | } |
||
46 | |||
47 | return $shippingMethod; |
||
48 | } |
||
49 | } |
||
50 |