src/Carbon/CarbonPeriod.php
public function hasFilter($filter)
    {
        $key = is_callable($filter) ? 0 : 1;

        foreach ($this->filters as $tuple) {
            if ($tuple[$key] === $filter) {
                return true;
            }
        }

        return false;
    }
public function hasFilter($filter)
    {
        $key = is_callable($filter) ? 0 : 1;

        foreach ($this->filters as $tuple) {
            if ($tuple[$key] === $filter) {
                return true;
            }
        }

        return false;
    }
public function hasFilter ( $ filter ) { $ key = is_callable ( $ filter ) ? 0 : 1 ; foreach ( $ this -> filters as $ tuple ) { if ( $ tuple [ $ key ] === $ filter ) { return true ; } } return false ; }
Return whether given instance or name is in the filter stack.

@param callable|string $filter

@return bool
Return whether given instance or name is in the filter stack .