protected function compare($first, $second, $operator)
    {
        switch ($operator) {
            case '<':
                return $first < $second;
            case '>':
                return $first > $second;
            case '<=':
                return $first <= $second;
            case '>=':
                return $first >= $second;
            case '=':
                return $first == $second;
            default:
                throw new InvalidArgumentException;
        }
    }
protected function compare($first, $second, $operator)
    {
        switch ($operator) {
            case '<':
                return $first < $second;
            case '>':
                return $first > $second;
            case '<=':
                return $first <= $second;
            case '>=':
                return $first >= $second;
            case '=':
                return $first == $second;
            default:
                throw new InvalidArgumentException;
        }
    }
protected function compare ( $ first , $ second , $ operator ) { switch ( $ operator ) { case '<' : return $ first < $ second ; case '>' : return $ first > $ second ; case '<=' : return $ first <= $ second ; case '>=' : return $ first >= $ second ; case '=' : return $ first == $ second ; default : throw new InvalidArgumentException ; } }
Determine if a comparison passes between the given values.

@param  mixed  $first
@param  mixed  $second
@param  string  $operator
@return bool

@throws \InvalidArgumentException
Determine if a comparison passes between the given values .