From 64a65e9cd1baca6e8cf4a745322fb3b33e569734 Mon Sep 17 00:00:00 2001 From: Tom Van Looy Date: Tue, 8 Jan 2019 14:01:58 +0100 Subject: [PATCH] Fix docs 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) --- src/Symfony/Component/Console/Command/Command.php | 2 +- src/Symfony/Component/Console/Input/InputOption.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index cd9db7603c67..3b4ba36ea56a 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -388,7 +388,7 @@ public function addArgument($name, $mode = null, $description = '', $default = n * Adds an option. * * @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|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants * @param string $description A description text * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) diff --git a/src/Symfony/Component/Console/Input/InputOption.php b/src/Symfony/Component/Console/Input/InputOption.php index 20c9d2ea5929..d30e571bf4b8 100644 --- a/src/Symfony/Component/Console/Input/InputOption.php +++ b/src/Symfony/Component/Console/Input/InputOption.php @@ -34,7 +34,7 @@ class InputOption /** * @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|null $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int|null $mode The option mode: One of the VALUE_* constants * @param string $description A description text * @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 /** * Returns the option shortcut. * - * @return string The shortcut + * @return string|null The shortcut */ public function getShortcut() {