Skip to content

Commit eb80377

Browse files
author
Robin Chalas
committed
[Console] Add missing null to input values allowed types
1 parent aca0dcc commit eb80377

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

Input/InputArgument.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class InputArgument
3131
private $description;
3232

3333
/**
34-
* @param string $name The argument name
35-
* @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL
36-
* @param string $description A description text
37-
* @param mixed $default The default value (for self::OPTIONAL mode only)
34+
* @param string $name The argument name
35+
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
36+
* @param string $description A description text
37+
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
3838
*
3939
* @throws InvalidArgumentException When argument mode is not valid
4040
*/
@@ -86,7 +86,7 @@ public function isArray()
8686
/**
8787
* Sets the default value.
8888
*
89-
* @param string|string[] $default The default value
89+
* @param string|string[]|null $default The default value
9090
*
9191
* @throws LogicException When incorrect default value is given
9292
*/
@@ -110,7 +110,7 @@ public function setDefault($default = null)
110110
/**
111111
* Returns the default value.
112112
*
113-
* @return string|string[] The default value
113+
* @return string|string[]|null The default value
114114
*/
115115
public function getDefault()
116116
{

Input/InputInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getArguments();
8383
*
8484
* @param string $name The argument name
8585
*
86-
* @return string|string[] The argument value
86+
* @return string|string[]|null The argument value
8787
*
8888
* @throws InvalidArgumentException When argument given doesn't exist
8989
*/
@@ -92,8 +92,8 @@ public function getArgument($name);
9292
/**
9393
* Sets an argument value by name.
9494
*
95-
* @param string $name The argument name
96-
* @param string|string[] $value The argument value
95+
* @param string $name The argument name
96+
* @param string|string[]|null $value The argument value
9797
*
9898
* @throws InvalidArgumentException When argument given doesn't exist
9999
*/
@@ -120,7 +120,7 @@ public function getOptions();
120120
*
121121
* @param string $name The option name
122122
*
123-
* @return string|string[]|bool The option value
123+
* @return string|string[]|bool|null The option value
124124
*
125125
* @throws InvalidArgumentException When option given doesn't exist
126126
*/
@@ -129,8 +129,8 @@ public function getOption($name);
129129
/**
130130
* Sets an option value by name.
131131
*
132-
* @param string $name The option name
133-
* @param string|string[]|bool $value The option value
132+
* @param string $name The option name
133+
* @param string|string[]|bool|null $value The option value
134134
*
135135
* @throws InvalidArgumentException When option given doesn't exist
136136
*/

Input/InputOption.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class InputOption
3333
private $description;
3434

3535
/**
36-
* @param string $name The option name
37-
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
38-
* @param int $mode The option mode: One of the VALUE_* constants
39-
* @param string $description A description text
40-
* @param mixed $default The default value (must be null for self::VALUE_NONE)
36+
* @param string $name The option name
37+
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
38+
* @param int|null $mode The option mode: One of the VALUE_* constants
39+
* @param string $description A description text
40+
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
4141
*
4242
* @throws InvalidArgumentException If option mode is invalid or incompatible
4343
*/
@@ -149,7 +149,7 @@ public function isArray()
149149
/**
150150
* Sets the default value.
151151
*
152-
* @param string|string[]|bool $default The default value
152+
* @param string|string[]|bool|null $default The default value
153153
*
154154
* @throws LogicException When incorrect default value is given
155155
*/
@@ -173,7 +173,7 @@ public function setDefault($default = null)
173173
/**
174174
* Returns the default value.
175175
*
176-
* @return string|string[]|bool The default value
176+
* @return string|string[]|bool|null The default value
177177
*/
178178
public function getDefault()
179179
{

0 commit comments

Comments
 (0)