src/Util/PathResolver.php
public function resolve($path, $baseFolder)
    {
        if (!is_string($path)) {
            return '';
        }
        if (stripos($path, 'file://') === 0) {
            $path = substr($path, 7);
        }
        if ($path === '') {
            return '';
        }
        if (preg_match('_^\w\w+://_', $path)) {
            return $this->resolveRemotePath($path);
        }

        return $this->resolveLocalPath($path, $baseFolder);
    }
public function resolve($path, $baseFolder)
    {
        if (!is_string($path)) {
            return '';
        }
        if (stripos($path, 'file://') === 0) {
            $path = substr($path, 7);
        }
        if ($path === '') {
            return '';
        }
        if (preg_match('_^\w\w+://_', $path)) {
            return $this->resolveRemotePath($path);
        }

        return $this->resolveLocalPath($path, $baseFolder);
    }
public function resolve ( $ path , $ baseFolder ) { if ( ! is_string ( $ path ) ) { return '' ; } if ( stripos ( $ path , 'file://' ) === 0 ) { $ path = substr ( $ path , 7 ) ; } if ( $ path === '' ) { return '' ; } if ( preg_match ( '_^\w\w+://_' , $ path ) ) { return $ this -> resolveRemotePath ( $ path ) ; } return $ this -> resolveLocalPath ( $ path , $ baseFolder ) ; }
Resolve a local or remote path.

@param string $path The path to be resolved
@param string $baseFolder the absolute path to be used when $path is a local relative path

@throws \ComposerPatcher\Exception\PathNotFound when $path is not found

@return string Empty string if $path is not a string or if it's an empty string
Resolve a local or remote path .