Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function removeRelated(CartActionEvent $event): void |
||
20 | { |
||
21 | /** @var ShoppingCart $cart */ |
||
22 | $cart = $event->sender; |
||
23 | /** @var CartPositionInterface $position */ |
||
24 | $position = $event->position; |
||
25 | if ($related = $cart->findRelatedFor($position)) { |
||
26 | $cart->remove($related); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 |