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