8000 minor #28714 Fix phpdocs (mschop) · symfony/symfony@34e55be · GitHub
[go: up one dir, main page]

Skip to content

Commit 34e55be

Browse files
committed
minor #28714 Fix phpdocs (mschop)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #28714). Discussion ---------- Fix phpdocs | Q | A | ------------- | --- | Branch? | all supported releases and master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes (I didn't run them, but just changed docs) | Fixed tickets | None | License | MIT See phan/phan#2025 for details. Fix phpdocs for Command for preventing static code analysis tools to emit false positives. Commits ------- 7196e49 Fix phpdocs
2 parents 5d6473b + 7196e49 commit 34e55be

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/Symfony/Component/Console/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)
0