protected function unexpectedCharacterMessage(int $code): string
    {
        if (isSourceCharacter($code) && !isLineTerminator($code)) {
            return \sprintf('Cannot contain the invalid character %s.', printCharCode($code));
        }

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

        return \sprintf('Cannot parse the unexpected character %s.', printCharCode($code));
    }
protected function unexpectedCharacterMessage(int $code): string
    {
        if (isSourceCharacter($code) && !isLineTerminator($code)) {
            return \sprintf('Cannot contain the invalid character %s.', printCharCode($code));
        }

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

        return \sprintf('Cannot parse the unexpected character %s.', printCharCode($code));
    }
protected function unexpectedCharacterMessage ( int $ code ) : string { if ( isSourceCharacter ( $ code ) && ! isLineTerminator ( $ code ) ) { return \ sprintf ( 'Cannot contain the invalid character %s.' , printCharCode ( $ code ) ) ; } if ( $ code === 39 ) { // ' return 'Unexpected single quote character (\'), did you mean to use a double quote (")?' ; } return \ sprintf ( 'Cannot parse the unexpected character %s.' , printCharCode ( $ code ) ) ; }
Report a message that an unexpected character was encountered.

@param int $code
@return string
Report a message that an unexpected character was encountered .