| @@ 245-258 (lines=14) @@ | ||
| 242 | /** |
|
| 243 | * {@inheritdoc} |
|
| 244 | */ |
|
| 245 | public function withScheme($scheme): self |
|
| 246 | { |
|
| 247 | return new self( |
|
| 248 | $scheme ?? null, |
|
| 249 | $this->host, |
|
| 250 | $this->port, |
|
| 251 | $this->user, |
|
| 252 | $this->password, |
|
| 253 | $this->path, |
|
| 254 | $this->query, |
|
| 255 | $this->fragment, |
|
| 256 | $this |
|
| 257 | ); |
|
| 258 | } |
|
| 259 | ||
| 260 | /** |
|
| 261 | * {@inheritdoc} |
|
| @@ 281-294 (lines=14) @@ | ||
| 278 | /** |
|
| 279 | * {@inheritdoc} |
|
| 280 | */ |
|
| 281 | public function withHost($host): self |
|
| 282 | { |
|
| 283 | return new self( |
|
| 284 | $this->scheme, |
|
| 285 | $host ?? null, |
|
| 286 | $this->port, |
|
| 287 | $this->user, |
|
| 288 | $this->password, |
|
| 289 | $this->path, |
|
| 290 | $this->query, |
|
| 291 | $this->fragment, |
|
| 292 | $this |
|
| 293 | ); |
|
| 294 | } |
|
| 295 | ||
| 296 | /** |
|
| 297 | * {@inheritdoc} |
|
| @@ 299-312 (lines=14) @@ | ||
| 296 | /** |
|
| 297 | * {@inheritdoc} |
|
| 298 | */ |
|
| 299 | public function withPort($port): self |
|
| 300 | { |
|
| 301 | return new self( |
|
| 302 | $this->scheme, |
|
| 303 | $this->host, |
|
| 304 | $port ?? null, |
|
| 305 | $this->user, |
|
| 306 | $this->password, |
|
| 307 | $this->path, |
|
| 308 | $this->query, |
|
| 309 | $this->fragment, |
|
| 310 | $this |
|
| 311 | ); |
|
| 312 | } |
|
| 313 | ||
| 314 | /** |
|
| 315 | * {@inheritdoc} |
|
| @@ 317-330 (lines=14) @@ | ||
| 314 | /** |
|
| 315 | * {@inheritdoc} |
|
| 316 | */ |
|
| 317 | public function withPath($path): self |
|
| 318 | { |
|
| 319 | return new self( |
|
| 320 | $this->scheme, |
|
| 321 | $this->host, |
|
| 322 | $this->port, |
|
| 323 | $this->user, |
|
| 324 | $this->password, |
|
| 325 | $path ?? null, |
|
| 326 | $this->query, |
|
| 327 | $this->fragment, |
|
| 328 | $this |
|
| 329 | ); |
|
| 330 | } |
|
| 331 | ||
| 332 | /** |
|
| 333 | * {@inheritdoc} |
|
| @@ 335-348 (lines=14) @@ | ||
| 332 | /** |
|
| 333 | * {@inheritdoc} |
|
| 334 | */ |
|
| 335 | public function withQuery($query): self |
|
| 336 | { |
|
| 337 | return new self( |
|
| 338 | $this->scheme, |
|
| 339 | $this->host, |
|
| 340 | $this->port, |
|
| 341 | $this->user, |
|
| 342 | $this->password, |
|
| 343 | $this->path, |
|
| 344 | $query ?? null, |
|
| 345 | $this->fragment, |
|
| 346 | $this |
|
| 347 | ); |
|
| 348 | } |
|
| 349 | ||
| 350 | /** |
|
| 351 | * {@inheritdoc} |
|
| @@ 353-366 (lines=14) @@ | ||
| 350 | /** |
|
| 351 | * {@inheritdoc} |
|
| 352 | */ |
|
| 353 | public function withFragment($fragment): self |
|
| 354 | { |
|
| 355 | return new self( |
|
| 356 | $this->scheme, |
|
| 357 | $this->host, |
|
| 358 | $this->port, |
|
| 359 | $this->user, |
|
| 360 | $this->password, |
|
| 361 | $this->path, |
|
| 362 | $this->query, |
|
| 363 | $fragment ?? null, |
|
| 364 | $this |
|
| 365 | ); |
|
| 366 | } |
|
| 367 | ||
| 368 | /** |
|
| 369 | * {@inheritdoc} |
|