[Console] Display console application name even when no version set

This commit is contained in:
Paul LE CORRE 2016-01-10 09:05:40 +01:00 committed by Fabien Potencier
parent 5d63c554e8
commit 61e810e769
1 changed files with 6 additions and 2 deletions

View File

@ -322,8 +322,12 @@ class Application
*/
public function getLongVersion()
{
if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) {
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
if ('UNKNOWN' !== $this->getName()) {
if ('UNKNOWN' !== $this->getVersion()) {
return sprintf('<info>%s</info> version <comment>%s</comment>', $this->getName(), $this->getVersion());
}
return sprintf('<info>%s</info>', $this->getName());
}
return '<info>Console Tool</info>';