Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function displayResults(OutputStyle $style, $lockFile, array $data, $showTaggedDev)
 {
     $style->text("Checked file: <fg=yellow>{$lockFile}</>");
     $style->newLine();
     $headers = array('Name', 'Local', 'Stable');
     $rows = array();
     if ($showTaggedDev) {
         $headers[] = 'Dev';
     }
     $errors = array();
     foreach ($data as $name => $status) {
         if ($style->getVerbosity() < OutputInterface::VERBOSITY_VERBOSE && !$status['stableStatus'] && (!$showTaggedDev || !$status['devStatus'])) {
             continue;
         }
         $row = array($status['name'], $this->tag($status['localVersion'], $status['localStatus']), $this->tag($status['stableVersion'], $status['stableStatus']));
         if ($showTaggedDev) {
             $row[] = $this->tag($status['devVersion'], $status['devStatus']);
         }
         $rows[] = $row;
     }
     if (count($errors)) {
         $style->error(implode(PHP_EOL, $errors));
     }
     if (count($rows)) {
         $style->table($headers, $rows);
     } else {
         $style->success('No outdated packages found.');
     }
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function set_task_count($task_count, $restart = false)
 {
     parent::set_task_count($task_count, $restart);
     if ($this->output->getVerbosity() === OutputInterface::VERBOSITY_NORMAL) {
         $this->progress_bar = $this->io->createProgressBar($task_count);
         $this->progress_bar->setFormat("    %current:3s%/%max:-3s% %bar%  %percent:3s%%\n" . "             %message%\n");
         $this->progress_bar->setBarWidth(60);
         if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
             $this->progress_bar->setEmptyBarCharacter('░');
             // light shade character \u2591
             $this->progress_bar->setProgressCharacter('');
             $this->progress_bar->setBarCharacter('▓');
             // dark shade character \u2593
         }
         $this->progress_bar->setMessage('');
         $this->io->newLine(2);
         $this->progress_bar->start();
     }
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function newLine($count = 1)
 {
     parent::newLine($count);
     $this->bufferedOutput->write(str_repeat("\n", $count));
 }
 /**
  * Display new line.
  *
  * @param OutputStyle $outputStyle Console output style.
  * @return ConfigurationDebugCommand $this
  */
 protected function displayNewLine(OutputStyle $outputStyle)
 {
     $outputStyle->newLine();
     return $this;
 }