/** * @param Environment $environment * * @param Table $table * * @return int */ protected function listProperties(Environment $environment, Table $table) { $headings = []; $values = []; foreach ($environment->getProperties() as $key => $value) { $headings[] = new AdaptiveTableCell($key, ['wrap' => false]); $values[] = $this->formatter->format($value, $key); } $table->renderSimple($values, $headings); return 0; }
/** * @param Environment $environment * @param OutputInterface $output * * @return int */ protected function listProperties(Environment $environment, OutputInterface $output) { $this->stdErr->writeln("Metadata for the environment <info>" . $environment['id'] . "</info>:"); $table = new Table($output); $table->setHeaders(array("Property", "Value")); foreach ($environment->getProperties() as $key => $value) { $table->addRow(array($key, $this->formatter->format($value, $key))); } $table->render(); return 0; }