src/Domain/Value/Identifier/Uri.php
protected static function encodeFragment(string $fragment): string
    {
        // http://tools.ietf.org/html/rfc3986#section-3.5
        // fragment = *( pchar / "/" / "?" )
        // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
        $excluded = static::UNRESERVED_SET.static::SUB_DELIMS_SET.':@\/\?';

        return static::encode($fragment, $excluded);
    }
protected static function encodeFragment(string $fragment): string
    {
        // http://tools.ietf.org/html/rfc3986#section-3.5
        // fragment = *( pchar / "/" / "?" )
        // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
        $excluded = static::UNRESERVED_SET.static::SUB_DELIMS_SET.':@\/\?';

        return static::encode($fragment, $excluded);
    }
protected static function encodeFragment ( string $ fragment ) : string { // http://tools.ietf.org/html/rfc3986#section-3.5 // fragment = *( pchar / "/" / "?" ) // pchar = unreserved / pct-encoded / sub-delims / ":" / "@" $ excluded = static :: UNRESERVED_SET . static :: SUB_DELIMS_SET . ':@\/\?' ; return static :: encode ( $ fragment , $ excluded ) ; }
Encodes the fragment

@param string $fragment The fragment

@return string
Encodes the fragment