From 308fa887469af8a73b71ce947c4459ac55dc40c2 Mon Sep 17 00:00:00 2001 From: Alexander Schwenn Date: Sun, 5 Mar 2017 21:06:44 +0100 Subject: [PATCH] Move $io->write calls together --- src/Composer/Command/ShowCommand.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 6e3123fe4..226ca8dd7 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -272,9 +272,6 @@ EOT $latestPackages = array(); foreach (array('platform:' => true, 'available:' => false, 'installed:' => true) as $type => $showVersion) { if (isset($packages[$type])) { - if ($showAllTypes) { - $io->write($type); - } ksort($packages[$type]); $nameLength = $versionLength = $latestLength = 0; @@ -321,6 +318,10 @@ EOT $latestLength += 2; } $hasOutdatedPackages = false; + + if ($showAllTypes) { + $io->write($type); + } foreach ($packages[$type] as $package) { if (is_object($package)) { $latestPackage = null;