Skip to content

Applied the new styles to the router: commands #14132

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
Prev Previous commit
Removed an unneded variable
  • Loading branch information
javiereguiluz committed Sep 28, 2015
commit 83cce3ad836fa0d1099ca1f4d65ed82034ef5fd5
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,9 @@ protected function describeRoute(Route $route, array $options = array())
array('Options', $this->formatRouterConfig($route->getOptions())),
);

if (isset($options['output_helper'])) {
$options['output_helper']->table($tableHeaders, $tableRows);
} else {
$table = new Table($this->getOutput());
$table->setHeaders($tableHeaders)->setRows($tableRows);
$table->render();
}
$table = new Table($this->getOutput());
$table->setHeaders($tableHeaders)->setRows($tableRows);
$table->render();
}

/**
Expand Down Expand Up @@ -183,7 +179,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
$serviceIds = isset($options['tag']) && $options['tag'] ? array_keys($builder->findTaggedServiceIds($options['tag'])) : $builder->getServiceIds();
$maxTags = array();

foreach ($serviceIds as $key => $serviceId) {
foreach ($serviceIds as $key => $serviceId) {
$definition = $this->resolveServiceDefinition($builder, $serviceId);
if ($definition instanceof Definition) {
// filter out private services unless shown explicitly
Expand Down Expand Up @@ -221,7 +217,7 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
foreach ($definition->getTag($showTag) as $key => $tag) {
$tagValues = array();
foreach ($tagsNames as $tagName) {
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : "";
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : '';
}
if (0 === $key) {
$table->addRow(array_merge(array($serviceId), $tagValues, array($definition->getClass())));
Expand All @@ -234,10 +230,10 @@ protected function describeContainerServices(ContainerBuilder $builder, array $o
}
} elseif ($definition instanceof Alias) {
$alias = $definition;
$table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, "") : array()));
$table->addRow(array_merge(array($serviceId, sprintf('alias for "%s"', $alias)), $tagsCount ? array_fill(0, $tagsCount, '') : array()));
} else {
// we have no information (happens with "service_container")
$table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, "") : array()));
$table->addRow(array_merge(array($serviceId, get_class($definition)), $tagsCount ? array_fill(0, $tagsCount, '') : array()));
}
}

Expand All @@ -254,7 +250,7 @@ protected function describeContainerDefinition(Definition $definition, array $op
: array();

$description[] = sprintf('<comment>Service Id</comment> %s', isset($options['id']) ? $options['id'] : '-');
$description[] = sprintf('<comment>Class</comment> %s', $definition->getClass() ?: "-");
$description[] = sprintf('<comment>Class</comment> %s', $definition->getClass() ?: '-');

$tags = $definition->getTags();
if (count($tags)) {
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy