Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | private function getMealVoucherFromItem(OrderItemInterface $item) |
||
35 | { |
||
36 | $product = $item->getProduct(); |
||
37 | |||
38 | if (null === $product->getProductType()) { |
||
39 | throw new \LogicException(\sprintf('No product category found in product name %s', $product->getName())); |
||
40 | } |
||
41 | |||
42 | return $product->getProductType()->getName(); |
||
43 | } |
||
45 |