| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function __invoke(RemoveWishlist $removeWishlist) |
||
| 28 | { |
||
| 29 | $token = $removeWishlist->getWishlistTokenValue(); |
||
| 30 | $wishlist = $this->wishlistRepository->findByToken($token); |
||
| 31 | |||
| 32 | if (null === $wishlist) { |
||
| 33 | throw new WishlistNotFoundException( |
||
| 34 | sprintf('The Wishlist %s does not exist', $token) |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->wishlistManager->remove($wishlist); |
||
| 39 | $this->wishlistManager->flush(); |
||
| 40 | } |
||
| 42 |