public function remove(Item $item): void
    {
        foreach ($this->list as $key => $itemToCheck) {
            if ($itemToCheck === $item) {
                unset($this->list[$key]);
                break;
            }
        }
    }
public function remove(Item $item): void
    {
        foreach ($this->list as $key => $itemToCheck) {
            if ($itemToCheck === $item) {
                unset($this->list[$key]);
                break;
            }
        }
    }
public function remove ( Item $ item ) : void { foreach ( $ this -> list as $ key => $ itemToCheck ) { if ( $ itemToCheck === $ item ) { unset ( $ this -> list [ $ key ] ) ; break ; } } }
Remove item from list.

@param Item $item
Remove item from list .