private static function validateQuery(
        $awqlString,
        $requiredKeywords,
        $forbiddenKeywords
    ) {
        if (empty($awqlString)) {
            return ValidationResult::fail('The AWQL string must not be' .
                ' null or empty');
        }

        if (!self::containAllKeywords($awqlString, $requiredKeywords)) {
            return ValidationResult::fail(
                sprintf(
                    'The AWQL string must contain %s clause(s).',
                    implode(', ', $requiredKeywords)
                )
            );
        }

        if (self::containAnyKeywords($awqlString, $forbiddenKeywords)) {
            return ValidationResult::fail(
                sprintf(
                    'The AWQL string must not contain %s clauses.',
                    implode(', ', $forbiddenKeywords)
                )
            );
        }

        return ValidationResult::pass();
    }