Search: initialize lowMatches as empty array.
parent
7154ef9af7
commit
bbac63821c
|
@ -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,12 +67,10 @@ 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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public function processPackage($package)
|
public function processPackage($package)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue