Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Commit 909aa60

Browse files
committed
Fix RFC3986 URI implementation
1 parent e5d7bfd commit 909aa60

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Rfc3986/Uri.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,20 +279,20 @@ public function withPort(?int $port): self
279279
};
280280
}
281281

282-
public function getRawPath(): ?string
282+
public function getRawPath(): string
283283
{
284-
return $this->getComponent(self::TYPE_RAW, 'path');
284+
return (string) $this->getComponent(self::TYPE_RAW, 'path');
285285
}
286286

287-
public function getPath(): ?string
287+
public function getPath(): string
288288
{
289-
return $this->getComponent(self::TYPE_NORMALIZED, 'path');
289+
return (string) $this->getComponent(self::TYPE_NORMALIZED, 'path');
290290
}
291291

292292
/**
293293
* @throws InvalidUriException
294294
*/
295-
public function withPath(?string $path): self
295+
public function withPath(string $path): self
296296
{
297297
return match (true) {
298298
$path === $this->getRawPath() => $this,

0 commit comments

Comments
 (0)