src/CSDT/CollectionsBundle/TraitCollection/ValueCollectionTrait.php
public function remove($value)
    {
        if ($this->contain($value)) {
            unset($this->content[array_search($value, $this->content)]);
            return $value;
        }
        
        return null;
    }
public function remove($value)
    {
        if ($this->contain($value)) {
            unset($this->content[array_search($value, $this->content)]);
            return $value;
        }
        
        return null;
    }
Remove

This method is used to remove an
element from the collection. It
return the removed element or null
if no one is removed.

@param mixed $value The value to remove

@return mixed|null