src/ArrayObject.php
public function filter($filter): ArrayObjectInterface
    {
        return \is_callable($filter, true) ? $this->filterCallback($filter) : $this->filterConditions($filter);
    }
public function filter($filter): ArrayObjectInterface
    {
        return \is_callable($filter, true) ? $this->filterCallback($filter) : $this->filterConditions($filter);
    }
public function filter ( $ filter ) : ArrayObjectInterface { return \ is_callable ( $ filter , true ) ? $ this -> filterCallback ( $ filter ) : $ this -> filterConditions ( $ filter ) ; }
Return a new collection by filtering data within the current collection.

@param mixed $filter

@return ArrayObjectInterface
Return a new collection by filtering data within the current collection .