show correct message when 0 keys are available

This commit is contained in:
Ernesto Jose Vargas Paz 2011-12-31 13:00:38 -05:00
parent c63e0dc979
commit f918402900

View File

@ -61,14 +61,14 @@ EOT
$count = count($keys);
$output->writeln(
sprintf(
$message = $count ? sprintf(
'Bellow %s the <info>%s key%s</info> that where found:',
$count > 1 ? 'are' : 'is',
$count,
$count > 1 ? 's': ''
)
);
) : "<info>0 keys</info> were found.";
$output->writeln($message);
$output->setDecorated(true);
foreach ($keys as $key) {