Handle empty namespaces
parent
2d670fc5cb
commit
dbd44d6bcf
|
@ -129,7 +129,7 @@ EOF;
|
||||||
strpos($namespace, '_') === false ? preg_quote(strtr($namespace, '\\', '/')) : ''
|
strpos($namespace, '_') === false ? preg_quote(strtr($namespace, '\\', '/')) : ''
|
||||||
);
|
);
|
||||||
foreach (ClassMapGenerator::createMap($dir, $whitelist) as $class => $path) {
|
foreach (ClassMapGenerator::createMap($dir, $whitelist) as $class => $path) {
|
||||||
if (0 === strpos($class, $namespace)) {
|
if ('' === $namespace || 0 === strpos($class, $namespace)) {
|
||||||
$path = '/'.$filesystem->findShortestPath(getcwd(), $path, true);
|
$path = '/'.$filesystem->findShortestPath(getcwd(), $path, true);
|
||||||
if (!isset($classMap[$class])) {
|
if (!isset($classMap[$class])) {
|
||||||
$classMap[$class] = '$baseDir . '.var_export($path, true).",\n";
|
$classMap[$class] = '$baseDir . '.var_export($path, true).",\n";
|
||||||
|
|
Loading…
Reference in New Issue