fix typo
parent
30b1dfb8a9
commit
61e0bf1cb5
|
@ -236,7 +236,7 @@ EOF;
|
||||||
|
|
||||||
// flatten array
|
// flatten array
|
||||||
$classMap = array();
|
$classMap = array();
|
||||||
$ambigiousClasses = array();
|
$ambiguousClasses = array();
|
||||||
if ($scanPsr0Packages) {
|
if ($scanPsr0Packages) {
|
||||||
$namespacesToScan = array();
|
$namespacesToScan = array();
|
||||||
|
|
||||||
|
@ -257,17 +257,17 @@ EOF;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$classMap = $this->addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist, $namespace, $group['type'], $classMap, $ambigiousClasses);
|
$classMap = $this->addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist, $namespace, $group['type'], $classMap, $ambiguousClasses);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($autoloads['classmap'] as $dir) {
|
foreach ($autoloads['classmap'] as $dir) {
|
||||||
$classMap = $this->addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist, null, null, $classMap, $ambigiousClasses);
|
$classMap = $this->addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist, null, null, $classMap, $ambiguousClasses);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($ambigiousClasses as $className => $ambigiousPaths)
|
foreach($ambiguousClasses as $className => $ambigiousPaths)
|
||||||
{
|
{
|
||||||
$cleanPath = str_replace(array('$vendorDir . \'', "',\n"), array($vendorPath, ''), $classMap[$className]);
|
$cleanPath = str_replace(array('$vendorDir . \'', "',\n"), array($vendorPath, ''), $classMap[$className]);
|
||||||
|
|
||||||
|
@ -337,17 +337,17 @@ EOF;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist = null, $namespaceFilter = null, $autoloadType = null, array $classMap, array &$ambigiousClasses)
|
private function addClassMapCode($filesystem, $basePath, $vendorPath, $dir, $blacklist = null, $namespaceFilter = null, $autoloadType = null, array $classMap, array &$ambiguousClasses)
|
||||||
{
|
{
|
||||||
foreach ($this->generateClassMap($dir, $blacklist, $namespaceFilter, $autoloadType) as $class => $path) {
|
foreach ($this->generateClassMap($dir, $blacklist, $namespaceFilter, $autoloadType) as $class => $path) {
|
||||||
$pathCode = $this->getPathCode($filesystem, $basePath, $vendorPath, $path).",\n";
|
$pathCode = $this->getPathCode($filesystem, $basePath, $vendorPath, $path).",\n";
|
||||||
if (!isset($classMap[$class])) {
|
if (!isset($classMap[$class])) {
|
||||||
$classMap[$class] = $pathCode;
|
$classMap[$class] = $pathCode;
|
||||||
} elseif ($this->io && $classMap[$class] !== $pathCode && !preg_match('{/(test|fixture|example|stub)s?/}i', strtr($classMap[$class].' '.$path, '\\', '/'))) {
|
} elseif ($this->io && $classMap[$class] !== $pathCode && !preg_match('{/(test|fixture|example|stub)s?/}i', strtr($classMap[$class].' '.$path, '\\', '/'))) {
|
||||||
if (!isset($ambigiousClasses[$class])) {
|
if (!isset($ambiguousClasses[$class])) {
|
||||||
$ambigiousClasses[$class] = array();
|
$ambiguousClasses[$class] = array();
|
||||||
}
|
}
|
||||||
$ambigiousClasses[$class][] = $path;
|
$ambiguousClasses[$class][] = $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue