@@ -103,9 +103,7 @@ public function toString(): string
103103
104104 public function toDisplayString (): string
105105 {
106- $ uri = $ this ->uri instanceof Uri ? $ this ->uri : Uri::new ($ this ->uri );
107-
108- return $ uri ->toDisplayString ();
106+ return ($ this ->uri instanceof Uri ? $ this ->uri : Uri::new ($ this ->toString ()))->toDisplayString ();
109107 }
110108
111109 public function withScheme (Stringable |string |null $ scheme ): static
@@ -1040,32 +1038,32 @@ public function getIdnUriString(): string
10401038 * Fragment modifier methods
10411039 *********************************/
10421040
1043- public function appendDirectives (FragmentDirectives |Directive |Stringable |string ...$ directives ): static
1041+ public function appendFragmentDirectives (FragmentDirectives |Directive |Stringable |string ...$ directives ): static
10441042 {
10451043 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->append (...$ directives ));
10461044 }
10471045
1048- public function prependDirectives (FragmentDirectives |Directive |Stringable |string ...$ directives ): static
1046+ public function prependFragmentDirectives (FragmentDirectives |Directive |Stringable |string ...$ directives ): static
10491047 {
10501048 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->prepend (...$ directives ));
10511049 }
10521050
1053- public function removeDirectives (int ...$ offset ): static
1051+ public function removeFragmentDirectives (int ...$ offset ): static
10541052 {
10551053 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->remove (...$ offset ));
10561054 }
10571055
1058- public function replaceDirective (int $ offset , Directive |Stringable |string $ directive ): static
1056+ public function replaceFragmentDirective (int $ offset , Directive |Stringable |string $ directive ): static
10591057 {
10601058 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->replace ($ offset , $ directive ));
10611059 }
10621060
1063- public function sliceDirectives (int $ offset , ?int $ length ): static
1061+ public function sliceFragmentDirectives (int $ offset , ?int $ length ): static
10641062 {
10651063 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->slice ($ offset , $ length ));
10661064 }
10671065
1068- public function filterDirectives (callable $ callback ): static
1066+ public function filterFragmentDirectives (callable $ callback ): static
10691067 {
10701068 return $ this ->withFragment (FragmentDirectives::fromUri ($ this ->uri ())->filter ($ callback ));
10711069 }
0 commit comments