src/Parser/Descriptor.php
private function getRelative($path, $against)
    {
        $relative = null;

        if (preg_replace(',/$,', '', $path) == $against ||
            Path::isBasePath($against, Path::getDirectory($path))
        ) {
            $relative = Path::makeRelative($path, $against);
            $relative = $relative ? '/'.$relative : '';
        }

        return $relative;
    }
private function getRelative($path, $against)
    {
        $relative = null;

        if (preg_replace(',/$,', '', $path) == $against ||
            Path::isBasePath($against, Path::getDirectory($path))
        ) {
            $relative = Path::makeRelative($path, $against);
            $relative = $relative ? '/'.$relative : '';
        }

        return $relative;
    }
private function getRelative ( $ path , $ against ) { $ relative = null ; if ( preg_replace ( ',/$,' , '' , $ path ) == $ against || Path :: isBasePath ( $ against , Path :: getDirectory ( $ path ) ) ) { $ relative = Path :: makeRelative ( $ path , $ against ) ; $ relative = $ relative ? '/' . $ relative : '' ; } return $ relative ; }
Gets the relative path if it matches against another path.

@param string $path    The path
@param string $against The path to match against

@return null|string The relative path
Gets the relative path if it matches against another path .