diff --git a/src/Purl/AbstractPart.php b/src/Purl/AbstractPart.php index 00da252..4b296cc 100644 --- a/src/Purl/AbstractPart.php +++ b/src/Purl/AbstractPart.php @@ -224,7 +224,7 @@ public function offsetGet($key): bool * * @return AbstractPart */ - public function offsetSet($key, $value): AbstractPart + public function offsetSet($key, $value): self { return $this->set($key, $value); } diff --git a/src/Purl/Url.php b/src/Purl/Url.php index 83f1334..87e0f59 100644 --- a/src/Purl/Url.php +++ b/src/Purl/Url.php @@ -86,7 +86,7 @@ public function __construct($url = null, ParserInterface $parser = null) * * @return Url */ - public static function parse($url): Url + public static function parse($url): self { return new self($url); } @@ -116,7 +116,7 @@ public static function extract($string): array * * @return Url */ - public static function fromCurrent(): Url + public static function fromCurrent(): self { $scheme = ( (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') @@ -197,7 +197,7 @@ public function setParser(ParserInterface $parser) * * @return Url */ - public function join($url): Url + public function join($url): self { $this->initialize(); $parts = $this->getParser()->parseUrl($url);