8000 [cookbook][console] Tweaking explanation of optional/required options · mehdimabrouk/symfony-docs@e39f5a8 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit e39f5a8

Browse files
committed
[cookbook][console] Tweaking explanation of optional/required options
1 parent dd4e93c commit e39f5a8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

cookbook/console.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ will work:
179179
180180
There are 4 option variants you can use:
181181

182-
=========================== ===================================
182+
=========================== =====================================================
183183
Option Value
184-
=========================== ===================================
184+
=========================== =====================================================
185185
InputOption::VALUE_IS_ARRAY This option accepts multiple values
186-
InputOption::VALUE_NONE Do not accept input for this option
187-
InputOption::VALUE_REQUIRED This option is required
188-
InputOption::VALUE_OPTIONAL This option is optional
189-
=========================== ===================================
186+
InputOption::VALUE_NONE Do not accept input for this option (e.g. ``--yell``)
187+
InputOption::VALUE_REQUIRED This value is required (e.g. ``iterations=5``)
188+
InputOption::VALUE_OPTIONAL This value is optional
189+
=========================== =====================================================
190190

191191
You can combine VALUE_IS_ARRAY with VALUE_REQUIRED or VALUE_OPTIONAL like this:
192192

@@ -196,8 +196,6 @@ You can combine VALUE_IS_ARRAY with VALUE_REQUIRED or VALUE_OPTIONAL like this:
196196
// ...
197197
->addOption('iterations', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'How many times should the message be printed?', 1)
198198
199-
200-
201199
Asking the User for Information
202200
-------------------------------
203201

0 commit comments

Comments
 (0)
0