Simplify duplicate case
parent
46cc387598
commit
3f09ae0737
|
@ -681,11 +681,7 @@ EOT
|
||||||
foreach ($package->getAutoload() as $type => $autoloads) {
|
foreach ($package->getAutoload() as $type => $autoloads) {
|
||||||
$io->write('<comment>' . $type . '</comment>');
|
$io->write('<comment>' . $type . '</comment>');
|
||||||
|
|
||||||
if ($type === 'psr-0') {
|
if ($type === 'psr-0' || $type === 'psr-4') {
|
||||||
foreach ($autoloads as $name => $path) {
|
|
||||||
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
|
||||||
}
|
|
||||||
} elseif ($type === 'psr-4') {
|
|
||||||
foreach ($autoloads as $name => $path) {
|
foreach ($autoloads as $name => $path) {
|
||||||
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
$io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.')));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue