Skip to content

Commit 72dc58e

Browse files
mschopfabpot
authored andcommitted
Fix phpdocs
See phan/phan#2025 for explaination
1 parent 9552f9f commit 72dc58e

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
@@ -363,10 +363,12 @@ public function getNativeDefinition()
363363
/**
364364
* Adds an argument.
365365
*
366-
* @param string $name The argument name
367-
* @param int $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
368-
* @param string $description A description text
369-
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
366+
* @param string $name The argument name
367+
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
368+
* @param string $description A description text
369+
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)
370+
*
371+
* @throws InvalidArgumentException When argument mode is not valid
370372
*
371373
* @return $this
372374
*/
@@ -380,11 +382,13 @@ public function addArgument($name, $mode = null, $description = '', $default = n
380382
/**
381383
* Adds an option.
382384
*
383-
* @param string $name The option name
384-
* @param string $shortcut The shortcut (can be null)
385-
* @param int $mode The option mode: One of the InputOption::VALUE_* constants
386-
* @param string $description A description text
387-
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
385+
* @param string $name The option name
386+
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
387+
* @param int|null $mode The option mode: One of the VALUE_* constants
388+
* @param string $description A description text
389+
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
390+
*
391+
* @throws InvalidArgumentException If option mode is invalid or incompatible
388392
*
389393
* @return $this
390394
*/

0 commit comments

Comments
 (0)