diff --git a/Components/Path.php b/Components/Path.php index 0a57bb52c..8d1cc44c9 100644 --- a/Components/Path.php +++ b/Components/Path.php @@ -47,10 +47,7 @@ private function __construct(Stringable|string $path) */ private function validate(Stringable|string $path): string { - /** @var string $path */ - $path = $this->validateComponent($path); - - return $path; + return (string) $this->validateComponent($path); } /** @@ -66,7 +63,6 @@ public static function new(Stringable|string $value = ''): self */ public static function fromUri(Stringable|string $uri): self { - $uri = self::filterUri($uri); if (!$uri instanceof UriInterface) { $uri = Uri::new($uri); }