protected static function encodeQuery(string $query): string
    {
        // http://tools.ietf.org/html/rfc3986#section-3.4
        // query = *( pchar / "/" / "?" )
        // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
        $excluded = static::UNRESERVED_SET.static::SUB_DELIMS_SET.':@\/\?';

        return static::encode($query, $excluded);
    }