Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
Advance list command empty notice
Browse files Browse the repository at this point in the history
  • Loading branch information
panlatent committed Jun 15, 2017
1 parent fe22473 commit 784c86d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Commands/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
protected function listGroups()
{
$groups = $this->manager->getGroups();
if (empty($groups)) {
$this->io->writeln('(empty)');
return;
}

sort($groups);
if ($this->isLong) {
foreach ($groups as $group) {
Expand Down Expand Up @@ -162,6 +167,11 @@ protected function listSites()
return $site->isEnable();
});
}
if (empty($sites)) {
$this->io->writeln('(empty)');
return;
}

sort($sites);
if ($this->isLong) {
$list = [];
Expand Down Expand Up @@ -203,6 +213,10 @@ protected function listServers()
return $server->getSite()->isEnable();
});
}
if (empty($servers)) {
$this->io->writeln('(empty)');
return;
}

sort($servers);
if ($this->isLong) {
Expand Down

0 comments on commit 784c86d

Please sign in to comment.