src/UthandoCommon/Model/AbstractCollection.php
public function offsetUnset($key)
    {
        $entityClass = $this->entityClass;

        if ($key instanceof $entityClass) {
            $this->entities = array_filter($this->entities, function ($v) use ($key) {
                return $v !== $key;
            });
            return true;
        }

        if (isset($this->entities[$key])) {
            unset($this->entities[$key]);
            return true;
        }

        return false;
    }
public function offsetUnset($key)
    {
        $entityClass = $this->entityClass;

        if ($key instanceof $entityClass) {
            $this->entities = array_filter($this->entities, function ($v) use ($key) {
                return $v !== $key;
            });
            return true;
        }

        if (isset($this->entities[$key])) {
            unset($this->entities[$key]);
            return true;
        }

        return false;
    }
public function offsetUnset ( $ key ) { $ entityClass = $ this -> entityClass ; if ( $ key instanceof $ entityClass ) { $ this -> entities = array_filter ( $ this -> entities , function ( $ v ) use ( $ key ) { return $ v !== $ key ; } ) ; return true ; } if ( isset ( $ this -> entities [ $ key ] ) ) { unset ( $ this -> entities [ $ key ] ) ; return true ; } return false ; }
Remove an entity from the collection

@param mixed $key
@return bool|void
Remove an entity from the collection