[Console] Add missing null to input values allowed types

This commit is contained in:
Robin Chalas 2018-09-30 12:06:51 +02:00
parent d1db71aa34
commit f0bc2a64d7
3 changed files with 19 additions and 19 deletions

View File

@ -31,10 +31,10 @@ class InputArgument
private $description; private $description;
/** /**
* @param string $name The argument name * @param string $name The argument name
* @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
* @param string $description A description text * @param string $description A description text
* @param mixed $default The default value (for self::OPTIONAL mode only) * @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
* *
* @throws InvalidArgumentException When argument mode is not valid * @throws InvalidArgumentException When argument mode is not valid
*/ */
@ -86,7 +86,7 @@ class InputArgument
/** /**
* Sets the default value. * Sets the default value.
* *
* @param string|string[] $default The default value * @param string|string[]|null $default The default value
* *
* @throws LogicException When incorrect default value is given * @throws LogicException When incorrect default value is given
*/ */
@ -110,7 +110,7 @@ class InputArgument
/** /**
* Returns the default value. * Returns the default value.
* *
* @return string|string[] The default value * @return string|string[]|null The default value
*/ */
public function getDefault() public function getDefault()
{ {

View File

@ -83,7 +83,7 @@ interface InputInterface
* *
* @param string $name The argument name * @param string $name The argument name
* *
* @return string|string[] The argument value * @return string|string[]|null The argument value
* *
* @throws InvalidArgumentException When argument given doesn't exist * @throws InvalidArgumentException When argument given doesn't exist
*/ */
@ -92,8 +92,8 @@ interface InputInterface
/** /**
* Sets an argument value by name. * Sets an argument value by name.
* *
* @param string $name The argument name * @param string $name The argument name
* @param string|string[] $value The argument value * @param string|string[]|null $value The argument value
* *
* @throws InvalidArgumentException When argument given doesn't exist * @throws InvalidArgumentException When argument given doesn't exist
*/ */
@ -120,7 +120,7 @@ interface InputInterface
* *
* @param string $name The option name * @param string $name The option name
* *
* @return string|string[]|bool The option value * @return string|string[]|bool|null The option value
* *
* @throws InvalidArgumentException When option given doesn't exist * @throws InvalidArgumentException When option given doesn't exist
*/ */
@ -129,8 +129,8 @@ interface InputInterface
/** /**
* Sets an option value by name. * Sets an option value by name.
* *
* @param string $name The option name * @param string $name The option name
* @param string|string[]|bool $value The option value * @param string|string[]|bool|null $value The option value
* *
* @throws InvalidArgumentException When option given doesn't exist * @throws InvalidArgumentException When option given doesn't exist
*/ */

View File

@ -33,11 +33,11 @@ class InputOption
private $description; private $description;
/** /**
* @param string $name The option name * @param string $name The option name
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
* @param int $mode The option mode: One of the VALUE_* constants * @param int|null $mode The option mode: One of the VALUE_* constants
* @param string $description A description text * @param string $description A description text
* @param mixed $default The default value (must be null for self::VALUE_NONE) * @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
* *
* @throws InvalidArgumentException If option mode is invalid or incompatible * @throws InvalidArgumentException If option mode is invalid or incompatible
*/ */
@ -149,7 +149,7 @@ class InputOption
/** /**
* Sets the default value. * Sets the default value.
* *
* @param string|string[]|bool $default The default value * @param string|string[]|bool|null $default The default value
* *
* @throws LogicException When incorrect default value is given * @throws LogicException When incorrect default value is given
*/ */
@ -173,7 +173,7 @@ class InputOption
/** /**
* Returns the default value. * Returns the default value.
* *
* @return string|string[]|bool The default value * @return string|string[]|bool|null The default value
*/ */
public function getDefault() public function getDefault()
{ {