/** * {@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.'); } }
/** * Make sure the database is up to date * * @throws \Exception */ public function run() { $version = $this->getDatabaseVersion(); $migrated = false; if ($version === null) { if ($this->hasTables()) { $migrated = $this->fromUnversioned(); } else { $migrated = $this->fromBlank(); } } else { $migrated = $this->fromVersion($version); } if ($migrated) { $this->saveDatabaseVersion(); $this->out->success('Updated the database to version ' . Client::FF_VERSION); } }
/** * {@inheritdoc */ public function add_success_message($error_title, $error_description = false) { $this->io->newLine(); $message = $this->translate_message($error_title, $error_description); $this->io->success($message['title'] . "\n" . $message['description']); if ($this->progress_bar !== null) { $this->io->newLine(2); $this->progress_bar->display(); } }
/** * @param Client $client * @param OutputStyle $output * * @throws \Exception */ public function run($client, OutputStyle $output) { $this->hit_count++; $output->success("Running '" . $this->shortcut . "' for the " . $client->ordinal($this->hit_count) . ' time.'); $command = $client->getSettings()->parseIdentifiers($this->command); switch (OS::getType()) { case OS::LINUX: $output->writeln('cmd:' . $command); break; case OS::WINDOWS: file_put_contents($client->getBatchPath(), $command); break; } $this->save(); }
/** * Display command success note. * * @param OutputStyle $outputStyle * @return FetchCommand $this Fluent interface. */ protected function displayCommandSuccess(OutputStyle $outputStyle) { $outputStyle->success('Exchange rates successfully fetched.'); return $this; }
public function onTeardown() { $this->io->success('Teardown complete'); }