src/helpers/Manifest.php
protected static function combinePaths(string ...$paths): string
    {
        $last_key = \count($paths) - 1;
        array_walk($paths, function (&$val, $key) use ($last_key) {
            switch ($key) {
                case 0:
                    $val = rtrim($val, '/ ');
                    break;
                case $last_key:
                    $val = ltrim($val, '/ ');
                    break;
                default:
                    $val = trim($val, '/ ');
                    break;
            }
        });

        $first = array_shift($paths);
        $last = array_pop($paths);
        $paths = array_filter($paths);
        array_unshift($paths, $first);
        $paths[] = $last;

        return implode('/', $paths);
    }
protected static function combinePaths(string ...$paths): string
    {
        $last_key = \count($paths) - 1;
        array_walk($paths, function (&$val, $key) use ($last_key) {
            switch ($key) {
                case 0:
                    $val = rtrim($val, '/ ');
                    break;
                case $last_key:
                    $val = ltrim($val, '/ ');
                    break;
                default:
                    $val = trim($val, '/ ');
                    break;
            }
        });

        $first = array_shift($paths);
        $last = array_pop($paths);
        $paths = array_filter($paths);
        array_unshift($paths, $first);
        $paths[] = $last;

        return implode('/', $paths);
    }
protected static function combinePaths ( string ... $ paths ) : string { $ last_key = \ count ( $ paths ) - 1 ; array_walk ( $ paths , function ( & $ val , $ key ) use ( $ last_key ) { switch ( $ key ) { case 0 : $ val = rtrim ( $ val , '/ ' ) ; break ; case $ last_key : $ val = ltrim ( $ val , '/ ' ) ; break ; default : $ val = trim ( $ val , '/ ' ) ; break ; } } ) ; $ first = array_shift ( $ paths ) ; $ last = array_pop ( $ paths ) ; $ paths = array_filter ( $ paths ) ; array_unshift ( $ paths , $ first ) ; $ paths [ ] = $ last ; return implode ( '/' , $ paths ) ; }
Combined the passed in paths, whether file system or URL

@param string ...$paths

@return string
Combined the passed in paths whether file system or URL