Example #1
0
 /**
  * @param ICommand $command
  */
 public function render(ICommand $command)
 {
     $name = $command->getName();
     $usage = "{$name} ";
     if (count($command->getArguments())) {
         $usage .= $this->getArgumentsUsage($command->getArguments());
     }
     if (count($command->getOptions())) {
         $usage .= ' ' . $this->getOptionsUsage($command->getOptions());
     }
     $usage = trim($usage);
     $this->output->writeLine();
     $this->output->writeLine("<header>Usage:</header>");
     $this->output->writeLineIndented("{$usage}");
 }