src/Validate.php
public static function operator($operator, $field_name = 'operator')
    {
        if (!in_array($operator, self::$operators)) {
            throw new IncorrectParametersException([ $field_name]);
        }
        return $operator;
    }
public static function operator($operator, $field_name = 'operator')
    {
        if (!in_array($operator, self::$operators)) {
            throw new IncorrectParametersException([ $field_name]);
        }
        return $operator;
    }
public static function operator ( $ operator , $ field_name = 'operator' ) { if ( ! in_array ( $ operator , self :: $ operators ) ) { throw new IncorrectParametersException ( [ $ field_name ] ) ; } return $ operator ; }
Validate an operator
@param string $operator
@param string $field_name [optional]
@return string
@throws IncorrectParameters If value type is not correct.
Validate an operator