Пример #1
0
 /**
  * @param string $sku
  *
  * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  *
  * @return Product
  */
 private function mustLoadProductBySku(string $sku) : Product
 {
     $product = $this->catalogueRepository->loadProductBySku($sku);
     if (!$product->isStored()) {
         throw new NotFoundHttpException();
     }
     return $product;
 }