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

Skip to content

Commit 54e45b0

Browse files
committed
Minor tweaks
1 parent efc6eb3 commit 54e45b0

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/Symfony/Component/ErrorRenderer/Command/DebugCommand.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
* A console command for retrieving information about error renderers.
2525
*
2626
* @author Yonel Ceruto <[email protected]>
27+
*
28+
* @internal
2729
*/
2830
class DebugCommand extends Command
2931
{
@@ -55,7 +57,7 @@ protected function configure(): void
5557
5658
<info>php %command.full_name%</info>
5759
58-
Or outputs a sample in a specific format:
60+
Or output a sample in a specific format:
5961
6062
<info>php %command.full_name% format</info>
6163

@@ -77,15 +79,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
7779
throw new InvalidArgumentException(sprintf('No error renderer found for format "%s". Known format are %s.', $format, implode(', ', array_keys($this->renderers))));
7880
}
7981

80-
$exception = FlattenException::createFromThrowable(new \Exception('Something has intentionally gone wrong.'), 500, ['X-Debug' => false]);
82+
$exception = FlattenException::createFromThrowable(new \Exception('This is a sample exception.'), 500, ['X-Debug' => false]);
8183
$io->writeln($renderers[$format]->render($exception));
8284
} else {
8385
$tableRows = [];
8486
foreach ($renderers as $format => $renderer) {
8587
$tableRows[] = [sprintf('<fg=cyan>%s</fg=cyan>', $format), \get_class($renderer)];
8688
}
8789

88-
$io->title('ErrorRenderer');
90+
$io->title('Error Renderers');
8991
$io->text('The following error renderers are available:');
9092
$io->newLine();
9193
$io->table(['Format', 'Class'], $tableRows);

src/Symfony/Component/ErrorRenderer/Tests/Command/DebugCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function testAvailableRenderers()
2929
$this->assertEquals(0, $ret, 'Returns 0 in case of success');
3030
$this->assertSame(<<<TXT
3131
32-
ErrorRenderer
33-
=============
32+
Error Renderers
33+
===============
3434
3535
The following error renderers are available:
3636
@@ -57,7 +57,7 @@ public function testFormatArgument()
5757
{
5858
"title": "Internal Server Error",
5959
"status": 500,
60-
"detail": "Something has intentionally gone wrong."
60+
"detail": "This is a sample exception."
6161
}
6262
6363
TXT

0 commit comments

Comments
 (0)