public function setFilter($filter = null)
    {
        $this->filter = is_callable($filter) ? $filter : null;

        return $this;
    }
public function setFilter($filter = null)
    {
        $this->filter = is_callable($filter) ? $filter : null;

        return $this;
    }
public function setFilter ( $ filter = null ) { $ this -> filter = is_callable ( $ filter ) ? $ filter : null ; return $ this ; }
Set the filter to be applied to the matches.

@param \Closure $filter

@return Matcher
Set the filter to be applied to the matches .