| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function handle(DropCart $dropCart) |
||
| 27 | { |
||
| 28 | /** @var OrderInterface $cart */ |
||
| 29 | $cart = $this->cartRepository->findOneBy(['tokenValue' => $dropCart->orderToken()]); |
||
| 30 | |||
| 31 | Assert::notNull($cart, sprintf('Order with %s token has not been found.', $dropCart->orderToken())); |
||
| 32 | Assert::same(OrderInterface::STATE_CART, $cart->getState()); |
||
| 33 | |||
| 34 | $this->cartRepository->remove($cart); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |