src/MutableBag.php
public function removeItem($item)
    {
        $key = array_search($item, $this->items, true);

        if ($key !== false) {
            unset($this->items[$key]);
        }
    }
public function removeItem($item)
    {
        $key = array_search($item, $this->items, true);

        if ($key !== false) {
            unset($this->items[$key]);
        }
    }
Removes the given item from the bag if it is found.

@param mixed $item