private function buildRequireArrayQuery($subclause, Builder $query)
    {
        if ($subclause['operator'] == 'IN') {
            $query->whereIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT IN') {
            $query->whereNotIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereBetween($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereNotBetween($subclause['to_value_column'], $subclause['value']);
        }

        return $query;
    }
private function buildRequireArrayQuery($subclause, Builder $query)
    {
        if ($subclause['operator'] == 'IN') {
            $query->whereIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT IN') {
            $query->whereNotIn($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereBetween($subclause['to_value_column'], $subclause['value']);
        } elseif ($subclause['operator'] == 'NOT BETWEEN') {
            if (count($subclause['value']) !== 2) {
                throw new QBParseException($subclause['to_value_column'].
                    ' should be an array with only two items.');
            }

            $query->whereNotBetween($subclause['to_value_column'], $subclause['value']);
        }

        return $query;
    }
private function buildRequireArrayQuery ( $ subclause , Builder $ query ) { if ( $ subclause [ 'operator' ] == 'IN' ) { $ query -> whereIn ( $ subclause [ 'to_value_column' ] , $ subclause [ 'value' ] ) ; } elseif ( $ subclause [ 'operator' ] == 'NOT IN' ) { $ query -> whereNotIn ( $ subclause [ 'to_value_column' ] , $ subclause [ 'value' ] ) ; } elseif ( $ subclause [ 'operator' ] == 'BETWEEN' ) { if ( count ( $ subclause [ 'value' ] ) !== 2 ) { throw new QBParseException ( $ subclause [ 'to_value_column' ] . ' should be an array with only two items.' ) ; } $ query -> whereBetween ( $ subclause [ 'to_value_column' ] , $ subclause [ 'value' ] ) ; } elseif ( $ subclause [ 'operator' ] == 'NOT BETWEEN' ) { if ( count ( $ subclause [ 'value' ] ) !== 2 ) { throw new QBParseException ( $ subclause [ 'to_value_column' ] . ' should be an array with only two items.' ) ; } $ query -> whereNotBetween ( $ subclause [ 'to_value_column' ] , $ subclause [ 'value' ] ) ; } return $ query ; }
The inner query for a subclause when an array is required

@see buildSubclauseInnerQuery
@throws QBParseException when an invalid array is passed.
@param array $subclause
@param Builder $query
@return Builder the query builder object
The inner query for a subclause when an array is required