Fix CS
parent
1f2d8908f3
commit
cea7c07cf2
|
@ -578,15 +578,13 @@ FOOTER;
|
||||||
|
|
||||||
foreach ($autoload[$type] as $namespace => $paths) {
|
foreach ($autoload[$type] as $namespace => $paths) {
|
||||||
foreach ((array) $paths as $path) {
|
foreach ((array) $paths as $path) {
|
||||||
if (($type === 'files' || $type === 'classmap') && $package->getTargetDir() && !is_readable($installPath.'/'.$path))
|
if (($type === 'files' || $type === 'classmap') && $package->getTargetDir() && !is_readable($installPath.'/'.$path)) {
|
||||||
{
|
|
||||||
// remove target-dir from file paths of the root package
|
// remove target-dir from file paths of the root package
|
||||||
if ($package === $mainPackage) {
|
if ($package === $mainPackage) {
|
||||||
$targetDir = str_replace('\\<dirsep\\>', '[\\\\/]', preg_quote(str_replace(array('/', '\\'), '<dirsep>', $package->getTargetDir())));
|
$targetDir = str_replace('\\<dirsep\\>', '[\\\\/]', preg_quote(str_replace(array('/', '\\'), '<dirsep>', $package->getTargetDir())));
|
||||||
$path = ltrim(preg_replace('{^'.$targetDir.'}', '', ltrim($path, '\\/')), '\\/');
|
$path = ltrim(preg_replace('{^'.$targetDir.'}', '', ltrim($path, '\\/')), '\\/');
|
||||||
}
|
} else {
|
||||||
// add target-dir from file paths that don't have it
|
// add target-dir from file paths that don't have it
|
||||||
else {
|
|
||||||
$path = $package->getTargetDir() . '/' . $path;
|
$path = $package->getTargetDir() . '/' . $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue