8000 [Console] Decouple SymfonyStyle from TableCell by ro0NL · Pull Request #19173 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Decouple SymfonyStyle from TableCell #19173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
php 53 compat
  • Loading branch information
ro0NL committed Jun 24, 2016
commit 7b114a8ab56bf854b2bb584c38ab1d958a0c0d16
5 changes: 4 additions & 1 deletion src/Symfony/Component/Console/Style/SymfonyStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,13 @@ public function caution($message)
*/
public function table(array $headers, array $rows)
{
$style = clone Table::getStyleDefinition('symfony-style-guide');
$style->setCellHeaderFormat('<info>%s</info>');

$table = new Table($this);
$table->setHeaders($headers);
$table->setRows($rows);
$table->setStyle((clone Table::getStyleDefinition('symfony-style-guide'))->setCellHeaderFormat('<info>%s</info>'));
$table->setStyle($style);

$table->render();
$this->newLine();
Expand Down
0