Skip to content

Add default indication in input arguments/options description #8096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions console/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ There are three argument variants you can use:
provided;

``InputArgument::OPTIONAL``
The argument is optional and therefore can be omitted;
The argument is optional and therefore can be omitted. This is the default
behavior of arguments;

``InputArgument::IS_ARRAY``
The argument can contain any number of values. For that reason, it must be
used at the end of the argument list
used at the end of the argument list.

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

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

``InputOption::VALUE_IS_ARRAY``
This option accepts multiple values (e.g. ``--dir=/foo --dir=/bar``);

``InputOption::VALUE_NONE``
Do not accept input for this option (e.g. ``--yell``);
Do not accept input for this option (e.g. ``--yell``). This is the default
behavior of options;

``InputOption::VALUE_REQUIRED``
This value is required (e.g. ``--iterations=5``), the option itself is
still optional;

``InputOption::VALUE_OPTIONAL``
This option may or may not have a value (e.g. ``--yell`` or
``--yell=loud``).
Expand Down