src/Domain/Value/Identifier/Uri.php
protected static function mergePaths(Uri $baseUri, string $relative): string
    {
        $basePath = $baseUri->path();

        if ($baseUri->authority() !== null && $basePath === '') {
            return sprintf('/%s', $relative);
        }

        $last = strrpos($basePath, '/');

        if ($last !== false) {
            return sprintf('%s/%s', substr($basePath, 0, $last), $relative);
        }

        return $relative;
    }
protected static function mergePaths(Uri $baseUri, string $relative): string
    {
        $basePath = $baseUri->path();

        if ($baseUri->authority() !== null && $basePath === '') {
            return sprintf('/%s', $relative);
        }

        $last = strrpos($basePath, '/');

        if ($last !== false) {
            return sprintf('%s/%s', substr($basePath, 0, $last), $relative);
        }

        return $relative;
    }
protected static function mergePaths ( Uri $ baseUri , string $ relative ) : string { $ basePath = $ baseUri -> path ( ) ; if ( $ baseUri -> authority ( ) !== null && $ basePath === '' ) { return sprintf ( '/%s' , $ relative ) ; } $ last = strrpos ( $ basePath , '/' ) ; if ( $ last !== false ) { return sprintf ( '%s/%s' , substr ( $ basePath , 0 , $ last ) , $ relative ) ; } return $ relative ; }
Merges a base URI and relative path

@link http://tools.ietf.org/html/rfc3986#section-5.2.3

@param Uri    $baseUri  The base Uri instance
@param string $relative The relative path

@return string
Merges a base URI and relative path