diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index 1b3ea7817..14a6570ea 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -84,10 +84,10 @@ EOT $packages[$package->getName()] = array( 'name' => $name, 'description' => strtok($package->getDescription(), "\r\n"), - 'length' => strlen($package->getPrettyName()) + 'length' => $length = strlen($package->getPrettyName()) ); - $maxPackageLength = max($maxPackageLength, strlen($package->getPrettyName())); + $maxPackageLength = max($maxPackageLength, $length); continue 2; }