@@ -161,7 +161,7 @@ public function getFragment(): string
161
161
return $ this ->fragment ;
162
162
}
163
163
164
- public function withScheme ($ scheme )
164
+ public function withScheme (string $ scheme ): UriInterface
165
165
{
166
166
return new self (
167
167
strtolower ($ scheme ),
@@ -174,7 +174,7 @@ public function withScheme($scheme)
174
174
);
175
175
}
176
176
177
- public function withUserInfo ($ user , $ password = null )
177
+ public function withUserInfo ($ user , ? string $ password = null ): UriInterface
178
178
{
179
179
$ info = $ user ;
180
180
if ($ password !== null && $ password !== '' ) {
@@ -192,7 +192,7 @@ public function withUserInfo($user, $password = null)
192
192
);
193
193
}
194
194
195
- public function withHost ($ host )
195
+ public function withHost (string $ host ): UriInterface
196
196
{
197
197
return new self (
198
198
$ this ->scheme ,
@@ -205,7 +205,7 @@ public function withHost($host)
205
205
);
206
206
}
207
207
208
- public function withPort ($ port )
208
+ public function withPort (? int $ port ): UriInterface
209
209
{
210
210
return new self (
211
211
$ this ->scheme ,
@@ -218,7 +218,7 @@ public function withPort($port)
218
218
);
219
219
}
220
220
221
- public function withPath ($ path )
221
+ public function withPath (string $ path ): UriInterface
222
222
{
223
223
return new self (
224
224
$ this ->scheme ,
@@ -231,7 +231,7 @@ public function withPath($path)
231
231
);
232
232
}
233
233
234
- public function withQuery ($ query )
234
+ public function withQuery (string $ query ): UriInterface
235
235
{
236
236
return new self (
237
237
$ this ->scheme ,
@@ -244,7 +244,7 @@ public function withQuery($query)
244
244
);
245
245
}
246
246
247
- public function withFragment ($ fragment )
247
+ public function withFragment (string $ fragment ): UriInterface
248
248
{
249
249
return new self (
250
250
$ this ->scheme ,
0 commit comments