Skip to content

Commit 115ef74

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Fix class documentation [Validator] Add a missing translation Fix phpdocs [EventDispatcher] Remove template method in test case Added LB translation for #27993 (UUID validator message translation) Replace deprecated validateValue with validate
2 parents 3b2b415 + 72dc58e commit 115ef74

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Command/Command.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,12 @@ public function getNativeDefinition()
369369
/**
370370
* Adds an argument.
371371
*
372-
* @param string $name The argument name
373-
* @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
374-
* @param string $description A description text
375-
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
372+
* @param string $name The argument name
373+
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
374+
* @param string $description A description text
375+
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
376+
*
377+
* @throws InvalidArgumentException When argument mode is not valid
376378
*
377379
* @return $this
378380
*/
@@ -386,11 +388,13 @@ public function addArgument($name, $mode = null, $description = '', $default = n
386388
/**
387389
* Adds an option.
388390
*
389-
* @param string $name The option name
390-
* @param string $shortcut The shortcut (can be null)
391-
* @param int $mode The option mode: One of the InputOption::VALUE_* constants
392-
* @param string $description A description text
393-
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
391+
* @param string $name The option name
392+
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
393+
* @param int|null $mode The option mode: One of the VALUE_* constants
394+
* @param string $description A description text
395+
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
396+
*
397+
* @throws InvalidArgumentException If option mode is invalid or incompatible
394398
*
395399
* @return $this
396400
*/

0 commit comments

Comments
 (0)