Skip to content

Commit e9c7a2e

Browse files
committed
Fix static method call
1 parent e973497 commit e9c7a2e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/console/helpers/progressbar.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,9 @@ Progress bars define a placeholder called ``message`` to display arbitrary
303303
messages. However, none of the built-in formats include that placeholder, so
304304
before displaying these messages, you must define your own custom format::
305305

306+
ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message%');
307+
306308
$progressBar = new ProgressBar($output, 100);
307-
$progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message%');
308309
$progressBar->setFormat('custom');
309310

310311
Now, use the ``setMessage()`` method to set the value of the ``%message%``
@@ -322,8 +323,9 @@ placeholder before displaying the progress bar::
322323
Messages can be combined with custom placeholders too. In this example, the
323324
progress bar uses the ``%message%`` and ``%filename%`` placeholders::
324325

326+
ProgressBar::setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327+
325328
$progressBar = new ProgressBar($output, 100);
326-
$progressBar->setFormatDefinition('custom', ' %current%/%max% -- %message% (%filename%)');
327329
$progressBar->setFormat('custom');
328330

329331
The ``setMessage()`` method accepts a second optional argument to set the value

0 commit comments

Comments
 (0)