src/Cart.php
public function remove($itemId)
    {
        $items = &$this->items;

        foreach ($items as $position => $item) {
            if ($itemId === $item->id) {
                unset($items[$position]);
            }
        }
    }
public function remove($itemId)
    {
        $items = &$this->items;

        foreach ($items as $position => $item) {
            if ($itemId === $item->id) {
                unset($items[$position]);
            }
        }
    }
public function remove ( $ itemId ) { $ items = & $ this -> items ; foreach ( $ items as $ position => $ item ) { if ( $ itemId === $ item -> id ) { unset ( $ items [ $ position ] ) ; } } }
Remove an item from the cart.

@param string $itemId
Remove an item from the cart .