src/Neutrino/HttpClient/Uri.php
public function extend($uri)
    {
        if (!$uri instanceof self) {
            $uri = new self($uri);
        }
        $this->parts = array_merge(
            $this->parts,
            array_diff_key($uri->parts, array_flip(['query', 'path']))
        );
        if (!empty($uri->parts['query'])) {
            $this->extendQuery($uri->parts['query']);
        }
        if (!empty($uri->parts['path'])) {
            $this->extendPath($uri->parts['path']);
        }
        return $this;
    }
public function extend($uri)
    {
        if (!$uri instanceof self) {
            $uri = new self($uri);
        }
        $this->parts = array_merge(
            $this->parts,
            array_diff_key($uri->parts, array_flip(['query', 'path']))
        );
        if (!empty($uri->parts['query'])) {
            $this->extendQuery($uri->parts['query']);
        }
        if (!empty($uri->parts['path'])) {
            $this->extendPath($uri->parts['path']);
        }
        return $this;
    }
@param $uri

@return $this