Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Jul 16, 2024
1 parent e69029b commit 1bdc1f3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Components/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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);
}
Expand Down

0 comments on commit 1bdc1f3

Please sign in to comment.