diff --git a/src/Controller/RemoveWishlistItemAction.php b/src/Controller/RemoveWishlistItemAction.php index cdf979f..6181b9b 100644 --- a/src/Controller/RemoveWishlistItemAction.php +++ b/src/Controller/RemoveWishlistItemAction.php @@ -59,16 +59,4 @@ public function __invoke(string $uuid, int $id): RedirectResponse 'uuid' => $uuid, ])); } - - private function getWishlist(string $uuid): WishlistInterface - { - // todo optimize this - foreach ($this->wishlistProvider->getWishlists() as $wishlist) { - if ($wishlist->getUuid() === $uuid) { - return $wishlist; - } - } - - throw new NotFoundHttpException(sprintf('Wishlist with uuid %s not found', $uuid)); - } }