Skip to content

Commit 448d051

Browse files
committed
Changing a few wordings as well as code references to methods
1 parent 1b2245f commit 448d051

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

components/console/helpers/formatterhelper.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ Symfony uses a defined style when printing to the command line.
2525
It prints the section in color and with brackets around and the
2626
actual message behind this section indication.
2727

28-
To reproduce this style, you can use the `` formatSection`` method like this::
28+
To reproduce this style, you can use the
29+
:method:`Symfony\\Component\\Console\\Helper\\FormatterHelper::formatSection`::
2930

3031
$formattedLine = $formatter->formatSection('SomeCommand', 'Some output from within the SomeCommand');
3132
$output->writeln($formattedLine);
@@ -37,13 +38,15 @@ Sometimes you want to be able to print a whole block of text with a background
3738
color. Symfony uses this when printing error messages.
3839

3940
If you print your error message on more than one line manually, you will
40-
notice that the background is only as long as each individual line. You
41-
can use the `formatBlock` method to create a real block output::
41+
notice that the background is only as long as each individual line. Use the
42+
:method:`Symfony\\Component\\Console\\Helper\\FormatterHelper::formatBlock`
43+
togenerate a block output::
4244

4345
$errorMessages = array('Error!', 'Something went wrong');
4446
$formattedBlock = $formatter->formatBlock($errorMessages, 'error');
4547
46-
As you can see, passing an array of messages to the `formatBlock` method creates
47-
the desired output. If you pass `true` as third parameter, the block will be
48-
formatted with more padding (one blank line above and below the messages and 2
49-
spaces on the left and right).
48+
As you can see, passing an array of messages to the
49+
:method:`Symfony\\Component\\Console\\Helper\\FormatterHelper::formatBlock`
50+
method creates the desired output. If you pass ``true`` as third parameter, the
51+
block will be formatted with more padding (one blank line above and below the
52+
messages and 2 spaces on the left and right).

0 commit comments

Comments
 (0)