protected function assert_comparator( $operator ) {
		if ( is_bool( $operator ) ) {
			return;
		}

		if ( in_array( $operator, array(
			'=',
			'!=',
			'>',
			'<',
			'>=',
			'<=',
			'<=>',
			'<>',
			'LIKE',
			'BETWEEN',
			'COALESCE',
			'GREATEST',
			'IN',
			'INTERVAL',
			'IS',
			'IS NOT',
			'IS NOT NULL',
			'IS NULL',
			'ISNULL',
			'LEAST',
			'NOT BETWEEN',
			'NOT IN',
			'NOT LIKE',
		), true ) ) {
			return;
		}

		throw new \InvalidArgumentException( sprintf( 'Invalid SQL operator % s . ', $operator ) );
	}
protected function assert_comparator( $operator ) {
		if ( is_bool( $operator ) ) {
			return;
		}

		if ( in_array( $operator, array(
			'=',
			'!=',
			'>',
			'<',
			'>=',
			'<=',
			'<=>',
			'<>',
			'LIKE',
			'BETWEEN',
			'COALESCE',
			'GREATEST',
			'IN',
			'INTERVAL',
			'IS',
			'IS NOT',
			'IS NOT NULL',
			'IS NULL',
			'ISNULL',
			'LEAST',
			'NOT BETWEEN',
			'NOT IN',
			'NOT LIKE',
		), true ) ) {
			return;
		}

		throw new \InvalidArgumentException( sprintf( 'Invalid SQL operator % s . ', $operator ) );
	}
protected function assert_comparator ( $ operator ) { if ( is_bool ( $ operator ) ) { return ; } if ( in_array ( $ operator , array ( '=' , '!=' , '>' , '<' , '>=' , '<=' , '<=>' , '<>' , 'LIKE' , 'BETWEEN' , 'COALESCE' , 'GREATEST' , 'IN' , 'INTERVAL' , 'IS' , 'IS NOT' , 'IS NOT NULL' , 'IS NULL' , 'ISNULL' , 'LEAST' , 'NOT BETWEEN' , 'NOT IN' , 'NOT LIKE' , ) , true ) ) { return ; } throw new \ InvalidArgumentException ( sprintf ( 'Invalid SQL operator % s . ' , $ operator ) ) ; }
Assert the operator is valid.

@since 2.0

@param string|bool $operator

@throws \InvalidArgumentException
Assert the operator is valid .