From 3f09ae07370a446ba2f3fb405d21187831a15c5a Mon Sep 17 00:00:00 2001 From: username Date: Sat, 29 Aug 2020 21:13:54 +0200 Subject: [PATCH] Simplify duplicate case --- src/Composer/Command/ShowCommand.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index e988cd2f5..68a8fa69f 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -681,11 +681,7 @@ EOT foreach ($package->getAutoload() as $type => $autoloads) { $io->write('' . $type . ''); - if ($type === 'psr-0') { - foreach ($autoloads as $name => $path) { - $io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.'))); - } - } elseif ($type === 'psr-4') { + if ($type === 'psr-0' || $type === 'psr-4') { foreach ($autoloads as $name => $path) { $io->write(($name ?: '*') . ' => ' . (is_array($path) ? implode(', ', $path) : ($path ?: '.'))); }