Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Improve a variable name and fixed the text descriptor code
  • Loading branch information
javiereguiluz committed Apr 1, 2015
commit 488a80f12ef1e53df40457af7b548e61cf56e904
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$output = new SymfonyStyle($input, $output);
$outputHelper = new SymfonyStyle($input, $output);

if (false !== strpos($input->getFirstArgument(), ':d')) {
$output->caution('The use of "router:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:router" instead.');
$outputHelper->caution('The use of "router:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:router" instead.');
}

$name = $input->getArgument('name');
Expand All @@ -100,6 +100,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
'name' => $name,
'output_helper' => $outputHelper,
));
} else {
$routes = $this->getContainer()->get('router')->getRouteCollection();
Expand All @@ -112,6 +113,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
'show_controllers' => $input->getOption('show-controllers'),
'output_helper' => $outputHelper,
));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function describeRouteCollection(RouteCollection $routes, array $optio
$tableRows[] = $row;
}

$this->getOutput()->table($tableHeaders, $tableRows);
$options['output_helper']->table($tableHeaders, $tableRows);
}

/**
Expand All @@ -89,7 +89,7 @@ protected function describeRoute(Route $route, array $options = array())
array('Options', $this->formatRouterConfig($route->getOptions())),
);

$this->getOutput()->table($tableHeaders, $tableRows);
$options['output_helper']->table($tableHeaders, $tableRows);
}

/**
Expand Down