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

Skip to content

Commit 6882afa

Browse files
committed
Fix CR issues
1 parent 6b47249 commit 6882afa

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,17 @@ class ConfigDebugCommand extends AbstractConfigCommand
4141
{
4242
protected function configure()
4343
{
44+
$commentedHelpFormats = array_map(static fn (string $format): string => sprintf('<comment>%s</comment>', $format), $this->getAvailableFormatOptions());
45+
$helpFormats = implode('", "', $commentedHelpFormats);
46+
4447
$this
4548
->setDefinition([
4649
new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'),
4750
new InputArgument('path', InputArgument::OPTIONAL, 'The configuration option path'),
4851
new InputOption('resolve-env', null, InputOption::VALUE_NONE, 'Display resolved environment variable values instead of placeholders'),
4952
new InputOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), class_exists(Yaml::class) ? 'yaml' : 'json'),
5053
])
51-
->setHelp(<<<'EOF'
54+
->setHelp(<<<EOF
5255
The <info>%command.name%</info> command dumps the current configuration for an
5356
extension/bundle.
5457
@@ -58,16 +61,17 @@ protected function configure()
5861
<info>php %command.full_name% FrameworkBundle</info>
5962
6063
The <info>--format</info> option specifies the format of the configuration,
61-
this is either <comment>yaml</comment> or <comment>json</comment>.
64+
this is either "{$helpFormats}".
6265
63-
<info>php %command.full_name% FrameworkBundle --format=json</info>
66+
<info>php %command.full_name% framework --format=json</info>
6467
6568
For dumping a specific option, add its path as second argument:
6669
6770
<info>php %command.full_name% framework serializer.enabled</info>
6871
6972
EOF
70-
);
73+
)
74+
;
7175
}
7276

7377
protected function execute(InputInterface $input, OutputInterface $output): int

0 commit comments

Comments
 (0)