10000 minor #8096 Add default indication in input arguments/options descrip… · symfony/symfony-docs@ac73154 · GitHub
[go: up one dir, main page]

Skip to content

Commit ac73154

Browse files
committed
minor #8096 Add default indication in input arguments/options description (medinae, javiereguiluz)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #8096). Discussion ---------- Add default indication in input arguments/options description As i had to check in the code to find the information (even if it can seems logical for some people), i think it can be good to precise that here. Commits ------- d710320 Minor reword 864c4da Add default indication in input arguments/options description
2 parents db32c99 + d710320 commit ac73154

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

console/input.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,12 @@ There are three argument variants you can use:
9191
provided;
9292

9393
``InputArgument::OPTIONAL``
94-
The argument is optional and therefore can be omitted;
94+
The argument is optional and therefore can be omitted. This is the default
95+
behavior of arguments;
9596

9697
``InputArgument::IS_ARRAY``
9798
The argument can contain any number of values. For that reason, it must be
98-
used at the end of the argument list
99+
used at the end of the argument list.
99100

100101
You can combine ``IS_ARRAY`` with ``REQUIRED`` and ``OPTIONAL`` like this::
101102

@@ -177,11 +178,15 @@ There are four option variants you can use:
177178

178179
``InputOption::VALUE_IS_ARRAY``
179180
This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``);
181+
180182
``InputOption::VALUE_NONE``
181-
Do not accept input for this option (e.g. ``--yell``);
183+
Do not accept input for this option (e.g. ``--yell``). This is the default
184+
behavior of options;
185+
182186
``InputOption::VALUE_REQUIRED``
183187
This value is required (e.g. ``--iterations=5``), the option itself is
184188
still optional;
189+
185190
``InputOption::VALUE_OPTIONAL``
186191
This option may or may not have a value (e.g. ``--yell`` or
187192
``--yell=loud``).

0 commit comments

Comments
 (0)
0