Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function getProductBundleForProduct(ProductInterface $product): ProductBundleInterface |
||
42 | { |
||
43 | /** @var ProductBundleInterface $productBundle */ |
||
44 | $productBundle = $this->productBundleRepository->findOneBy(['product' => $product]); |
||
45 | if (!$productBundle instanceof ProductBundleInterface) { |
||
46 | throw new ProductIsNotAProductBundleException($product); |
||
47 | } |
||
48 | |||
49 | return $productBundle; |
||
50 | } |
||
51 | } |
||
52 |