8000 fixed previous merge (refs #8635) · symfony/symfony@4705e6f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4705e6f

Browse files
committed
fixed previous merge (refs #8635)
1 parent 7005cf5 commit 4705e6f

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
1515
use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper;
1616
use Symfony\Component\Console\Input\InputArgument;
17+
use Symfony\Component\Console\Input\InputOption;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Config\Definition\ConfigurationInterface;
@@ -34,25 +35,21 @@ protected function configure()
3435
$this
3536
->setName('config:dump-reference')
3637
->setDefinition(array(
37-
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle or extension alias'),
38+
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'),
3839
new InputOption('format', null, InputOption::VALUE_REQUIRED, 'The format, either yaml or xml', 'yaml'),
3940
))
40-
->setDescription('Dumps default configuration for an extension')
41+
->setDescription('Dumps the default configuration for an extension')
4142
->setHelp(<<<EOF
42-
The <info>%command.name%</info> command dumps the default configuration for an extension/bundle.
43+
The <info>%command.name%</info> command dumps the default configuration for an
44+
extension/bundle.
4345
4446
The extension alias or bundle name can be used:
4547
46-
Example:
47-
4848
<info>php %command.full_name% framework</info>
49-
50-
or
51-
5249
<info>php %command.full_name% FrameworkBundle</info>
5350
54-
With the <info>format</info> option specifies the format of the configuration, this is either yaml
55-
or xml. When the option is not provided, yaml is used.
51+
With the <info>format</info> option specifies the format of the configuration,
52+
this is either <comment>yaml</comment> or <comment>xml</comment>. When the option is not provided, <comment>yaml</comment> is used.
5653
EOF
5754
)
5855
;
@@ -122,16 +119,17 @@ protected function execute(InputInterface $input, OutputInterface $output)
122119
throw new \LogicException(sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable', get_class($configuration)));
123120
}
124121

125-
$output->writeln($message);
126-
127122
switch ($input->getOption('format')) {
128123
case 'yaml':
124+
$output->writeln(sprintf('# %s', $message));
129125
$dumper = new YamlReferenceDumper();
130126
break;
131127
case 'xml':
128+
$output->writeln(sprintf('<!-- %s -->', $message));
132129
$dumper = new XmlReferenceDumper();
133130
break;
134131
default:
132+
$output->writeln($message);
135133
throw new \InvalidArgumentException('Only the yaml and xml formats are supported.');
136134
}
137135

src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function dumpNode(NodeInterface $node, $namespace = null)
4444
/**
4545
* @param NodeInterface $node
4646
* @param integer $depth
47-
* @param boolean $root If the node is the root node
47+
* @param Boolean $root If the node is the root node
4848
* @param string $namespace The namespace of the node
4949
*/
5050
private function writeNode(NodeInterface $node, $depth = 0, $root = false, $namespace = null)

0 commit comments

Comments
 (0)
0