Skip to content

Commit

Permalink
Fix bin/ushahidi for new symfony/console version
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmackay committed Apr 4, 2017
1 parent 12fb119 commit 21c50cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\Console\Command\Command as ConsoleCommand;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Helper\TableHelper;
use Symfony\Component\Console\Helper\Table;

abstract class Command extends ConsoleCommand
{
Expand All @@ -40,7 +40,7 @@ protected function handleResponse($response, OutputInterface $output)
{
if (is_array($response)) {
// Display arrays as tables.
$table = $this->getHelperSet()->get('table');
$table = new Table($output);

$keys = array_keys($response);

Expand All @@ -64,7 +64,6 @@ protected function handleResponse($response, OutputInterface $output)

// Display the table using compact layout.
$table
->setLayout(TableHelper::LAYOUT_COMPACT)
->render($output);
} else {
// Otherwise, just write the response.
Expand Down

0 comments on commit 21c50cd

Please sign in to comment.