From bbac63821c80c4d53dbb15632d993873afee91a1 Mon Sep 17 00:00:00 2001 From: Povilas Balzaravicius Pawka Date: Thu, 6 Sep 2012 13:39:51 +0300 Subject: [PATCH] Search: initialize lowMatches as empty array. --- src/Composer/Command/SearchCommand.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php index b852314fc..e332ac1f8 100644 --- a/src/Composer/Command/SearchCommand.php +++ b/src/Composer/Command/SearchCommand.php @@ -27,7 +27,7 @@ use Composer\Factory; class SearchCommand extends Command { protected $matches; - protected $lowMatches; + protected $lowMatches = array(); protected $tokens; protected $output; @@ -67,10 +67,8 @@ EOT $this->output = $output; $repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage'); - if (!empty($this->lowMatches)) { - foreach ($this->lowMatches as $details) { - $output->writeln($details['name'] . ': '. $details['description']); - } + foreach ($this->lowMatches as $details) { + $output->writeln($details['name'] . ': '. $details['description']); } }