[FrameworkBundle] remove redundant PHPDoc in console Descriptor and subclass
The PHPDoc for some describeXXX methods in the abstract Descriptor was inacurate or redundant.
This commit is contained in:
parent
e44a3f55ad
commit
e535e7d2ff
@ -100,24 +100,12 @@ abstract class Descriptor implements DescriptorInterface
|
|||||||
$this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
|
$this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes an InputArgument instance.
|
|
||||||
*/
|
|
||||||
abstract protected function describeRouteCollection(RouteCollection $routes, array $options = []);
|
abstract protected function describeRouteCollection(RouteCollection $routes, array $options = []);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes an InputOption instance.
|
|
||||||
*/
|
|
||||||
abstract protected function describeRoute(Route $route, array $options = []);
|
abstract protected function describeRoute(Route $route, array $options = []);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes container parameters.
|
|
||||||
*/
|
|
||||||
abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = []);
|
abstract protected function describeContainerParameters(ParameterBag $parameters, array $options = []);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes container tags.
|
|
||||||
*/
|
|
||||||
abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = []);
|
abstract protected function describeContainerTags(ContainerBuilder $builder, array $options = []);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -138,19 +126,10 @@ abstract class Descriptor implements DescriptorInterface
|
|||||||
*/
|
*/
|
||||||
abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = []);
|
abstract protected function describeContainerServices(ContainerBuilder $builder, array $options = []);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes a service definition.
|
|
||||||
*/
|
|
||||||
abstract protected function describeContainerDefinition(Definition $definition, array $options = []);
|
abstract protected function describeContainerDefinition(Definition $definition, array $options = []);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes a service alias.
|
|
||||||
*/
|
|
||||||
abstract protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null);
|
abstract protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null);
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes a container parameter.
|
|
||||||
*/
|
|
||||||
abstract protected function describeContainerParameter($parameter, array $options = []);
|
abstract protected function describeContainerParameter($parameter, array $options = []);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -29,9 +29,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||||||
*/
|
*/
|
||||||
class JsonDescriptor extends Descriptor
|
class JsonDescriptor extends Descriptor
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
||||||
{
|
{
|
||||||
$data = [];
|
$data = [];
|
||||||
@ -42,25 +39,16 @@ class JsonDescriptor extends Descriptor
|
|||||||
$this->writeData($data, $options);
|
$this->writeData($data, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRoute(Route $route, array $options = [])
|
protected function describeRoute(Route $route, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeData($this->getRouteData($route), $options);
|
$this->writeData($this->getRouteData($route), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeData($this->sortParameters($parameters), $options);
|
$this->writeData($this->sortParameters($parameters), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
||||||
{
|
{
|
||||||
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
||||||
@ -128,17 +116,11 @@ class JsonDescriptor extends Descriptor
|
|||||||
$this->writeData($data, $options);
|
$this->writeData($data, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeData($this->getContainerDefinitionData($definition, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options);
|
$this->writeData($this->getContainerDefinitionData($definition, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
||||||
{
|
{
|
||||||
if (!$builder) {
|
if (!$builder) {
|
||||||
@ -169,9 +151,6 @@ class JsonDescriptor extends Descriptor
|
|||||||
$this->writeData($this->getCallableData($callable), $options);
|
$this->writeData($this->getCallableData($callable), $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameter($parameter, array $options = [])
|
protected function describeContainerParameter($parameter, array $options = [])
|
||||||
{
|
{
|
||||||
$key = isset($options['parameter']) ? $options['parameter'] : '';
|
$key = isset($options['parameter']) ? $options['parameter'] : '';
|
||||||
|
@ -27,9 +27,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||||||
*/
|
*/
|
||||||
class MarkdownDescriptor extends Descriptor
|
class MarkdownDescriptor extends Descriptor
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
||||||
{
|
{
|
||||||
$first = true;
|
$first = true;
|
||||||
@ -44,9 +41,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
$this->write("\n");
|
$this->write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRoute(Route $route, array $options = [])
|
protected function describeRoute(Route $route, array $options = [])
|
||||||
{
|
{
|
||||||
$output = '- Path: '.$route->getPath()
|
$output = '- Path: '.$route->getPath()
|
||||||
@ -66,9 +60,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
$this->write("\n");
|
$this->write("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
||||||
{
|
{
|
||||||
$this->write("Container parameters\n====================\n");
|
$this->write("Container parameters\n====================\n");
|
||||||
@ -77,9 +68,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
||||||
{
|
{
|
||||||
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
||||||
@ -176,9 +164,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
||||||
{
|
{
|
||||||
$output = '- Class: `'.$definition->getClass().'`'
|
$output = '- Class: `'.$definition->getClass().'`'
|
||||||
@ -240,9 +225,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
$this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
|
$this->write(isset($options['id']) ? sprintf("### %s\n\n%s\n", $options['id'], $output) : $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
||||||
{
|
{
|
||||||
$output = '- Service: `'.$alias.'`'
|
$output = '- Service: `'.$alias.'`'
|
||||||
@ -264,9 +246,6 @@ class MarkdownDescriptor extends Descriptor
|
|||||||
$this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias]));
|
$this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameter($parameter, array $options = [])
|
protected function describeContainerParameter($parameter, array $options = [])
|
||||||
{
|
{
|
||||||
$this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter);
|
$this->write(isset($options['parameter']) ? sprintf("%s\n%s\n\n%s", $options['parameter'], str_repeat('=', \strlen($options['parameter'])), $this->formatParameter($parameter)) : $parameter);
|
||||||
|
@ -33,9 +33,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||||||
*/
|
*/
|
||||||
class TextDescriptor extends Descriptor
|
class TextDescriptor extends Descriptor
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
||||||
{
|
{
|
||||||
$showControllers = isset($options['show_controllers']) && $options['show_controllers'];
|
$showControllers = isset($options['show_controllers']) && $options['show_controllers'];
|
||||||
@ -72,9 +69,6 @@ class TextDescriptor extends Descriptor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRoute(Route $route, array $options = [])
|
protected function describeRoute(Route $route, array $options = [])
|
||||||
{
|
{
|
||||||
$tableHeaders = ['Property', 'Value'];
|
$tableHeaders = ['Property', 'Value'];
|
||||||
@ -100,9 +94,6 @@ class TextDescriptor extends Descriptor
|
|||||||
$table->render();
|
$table->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
||||||
{
|
{
|
||||||
$tableHeaders = ['Parameter', 'Value'];
|
$tableHeaders = ['Parameter', 'Value'];
|
||||||
@ -116,9 +107,6 @@ class TextDescriptor extends Descriptor
|
|||||||
$options['output']->table($tableHeaders, $tableRows);
|
$options['output']->table($tableHeaders, $tableRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
||||||
{
|
{
|
||||||
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
$showPrivate = isset($options['show_private']) && $options['show_private'];
|
||||||
@ -252,9 +240,6 @@ class TextDescriptor extends Descriptor
|
|||||||
$options['output']->table($tableHeaders, $tableRows);
|
$options['output']->table($tableHeaders, $tableRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
||||||
{
|
{
|
||||||
if (isset($options['id'])) {
|
if (isset($options['id'])) {
|
||||||
@ -358,9 +343,6 @@ class TextDescriptor extends Descriptor
|
|||||||
$options['output']->table($tableHeaders, $tableRows);
|
$options['output']->table($tableHeaders, $tableRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
||||||
{
|
{
|
||||||
$options['output']->comment(sprintf('This service is an alias for the service <info>%s</info>', (string) $alias));
|
$options['output']->comment(sprintf('This service is an alias for the service <info>%s</info>', (string) $alias));
|
||||||
@ -372,9 +354,6 @@ class TextDescriptor extends Descriptor
|
|||||||
$this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias]));
|
$this->describeContainerDefinition($builder->getDefinition((string) $alias), array_merge($options, ['id' => (string) $alias]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameter($parameter, array $options = [])
|
protected function describeContainerParameter($parameter, array $options = [])
|
||||||
{
|
{
|
||||||
$options['output']->table(
|
$options['output']->table(
|
||||||
|
@ -29,33 +29,21 @@ use Symfony\Component\Routing\RouteCollection;
|
|||||||
*/
|
*/
|
||||||
class XmlDescriptor extends Descriptor
|
class XmlDescriptor extends Descriptor
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
protected function describeRouteCollection(RouteCollection $routes, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getRouteCollectionDocument($routes));
|
$this->writeDocument($this->getRouteCollectionDocument($routes));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeRoute(Route $route, array $options = [])
|
protected function describeRoute(Route $route, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getRouteDocument($route, isset($options['name']) ? $options['name'] : null));
|
$this->writeDocument($this->getRouteDocument($route, isset($options['name']) ? $options['name'] : null));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
protected function describeContainerParameters(ParameterBag $parameters, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getContainerParametersDocument($parameters));
|
$this->writeDocument($this->getContainerParametersDocument($parameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
protected function describeContainerTags(ContainerBuilder $builder, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_private']) && $options['show_private']));
|
$this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_private']) && $options['show_private']));
|
||||||
@ -81,17 +69,11 @@ class XmlDescriptor extends Descriptor
|
|||||||
$this->writeDocument($this->getContainerServicesDocument($builder, isset($options['tag']) ? $options['tag'] : null, isset($options['show_private']) && $options['show_private'], isset($options['show_arguments']) && $options['show_arguments'], isset($options['filter']) ? $options['filter'] : null));
|
$this->writeDocument($this->getContainerServicesDocument($builder, isset($options['tag']) ? $options['tag'] : null, isset($options['show_private']) && $options['show_private'], isset($options['show_arguments']) && $options['show_arguments'], isset($options['filter']) ? $options['filter'] : null));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
protected function describeContainerDefinition(Definition $definition, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getContainerDefinitionDocument($definition, isset($options['id']) ? $options['id'] : null, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']));
|
$this->writeDocument($this->getContainerDefinitionDocument($definition, isset($options['id']) ? $options['id'] : null, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $builder = null)
|
||||||
{
|
{
|
||||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||||
@ -124,9 +106,6 @@ class XmlDescriptor extends Descriptor
|
|||||||
$this->writeDocument($this->getCallableDocument($callable));
|
$this->writeDocument($this->getCallableDocument($callable));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
protected function describeContainerParameter($parameter, array $options = [])
|
protected function describeContainerParameter($parameter, array $options = [])
|
||||||
{
|
{
|
||||||
$this->writeDocument($this->getContainerParameterDocument($parameter, $options));
|
$this->writeDocument($this->getContainerParameterDocument($parameter, $options));
|
||||||
|
Reference in New Issue
Block a user