/** * {@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.'); } }