Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a5c52b8

Browse filesBrowse files
committed
minor #29815 [Console] Fix phpdoc for InputOption shortcut (tvlooy)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #29815). Discussion ---------- [Console] Fix phpdoc for InputOption shortcut symfony documentation tells people to pass null, and it is the default, but the method docs don't allow it so static analyzers complain about it (spotted by phan) | Q | A | ------------- | --- | Branch? | 3.4 (careful when merging) | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 64a65e9 Fix docs
2 parents 3245cb4 + 64a65e9 commit a5c52b8
Copy full SHA for a5c52b8

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎src/Symfony/Component/Console/Command/Command.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Command/Command.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function addArgument($name, $mode = null, $description = '', $default = n
388388
* Adds an option.
389389
*
390390
* @param string $name The option name
391-
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
391+
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
392392
* @param int|null $mode The option mode: One of the InputOption::VALUE_* constants
393393
* @param string $description A description text
394394
* @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE)

‎src/Symfony/Component/Console/Input/InputOption.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Input/InputOption.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class InputOption
3434

3535
/**
3636
* @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
37+
* @param string|array|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
3838
* @param int|null $mode The option mode: One of the VALUE_* constants
3939
* @param string $description A description text
4040
* @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE)
@@ -89,7 +89,7 @@ public function __construct($name, $shortcut = null, $mode = null, $description
8989
/**
9090
* Returns the option shortcut.
9191
*
92-
* @return string The shortcut
92+
* @return string|null The shortcut
9393
*/
9494
public function getShortcut()
9595
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.