1
0
Fork 0

Search: initialize lowMatches as empty array.

pull/1073/head
Povilas Balzaravicius Pawka 2012-09-06 13:39:51 +03:00
parent 7154ef9af7
commit bbac63821c
1 changed files with 3 additions and 5 deletions

View File

@ -27,7 +27,7 @@ use Composer\Factory;
class SearchCommand extends Command class SearchCommand extends Command
{ {
protected $matches; protected $matches;
protected $lowMatches; protected $lowMatches = array();
protected $tokens; protected $tokens;
protected $output; protected $output;
@ -67,10 +67,8 @@ EOT
$this->output = $output; $this->output = $output;
$repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage'); $repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage');
if (!empty($this->lowMatches)) { foreach ($this->lowMatches as $details) {
foreach ($this->lowMatches as $details) { $output->writeln($details['name'] . '<comment>:</comment> '. $details['description']);
$output->writeln($details['name'] . '<comment>:</comment> '. $details['description']);
}
} }
} }