Automattic\WooCommerce\Vendor\GraphQL\Language

Lexer::unexpectedCharacterMessageprivateWC 1.0

Method of the class: Lexer{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->unexpectedCharacterMessage( ?int $code ): string;
?int $code(required)
.

Lexer::unexpectedCharacterMessage() code WC 11.0.1

private function unexpectedCharacterMessage(?int $code): string
{
    // SourceCharacter
    if ($code < 0x0020 && $code !== 0x0009 && $code !== 0x000A && $code !== 0x000D) {
        return 'Cannot contain the invalid character ' . Utils::printCharCode($code);
    }

    if ($code === 39) {
        return 'Unexpected single quote character (\'), did you mean to use a double quote (")?';
    }

    return 'Cannot parse the unexpected character ' . Utils::printCharCode($code) . '.';
}