Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/console/Input/InputArgument.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
line wrap: on
line diff
--- a/vendor/symfony/console/Input/InputArgument.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/console/Input/InputArgument.php Thu Feb 28 13:21:36 2019 +0000 @@ -31,10 +31,10 @@ private $description; /** - * @param string $name The argument name - * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL - * @param string $description A description text - * @param mixed $default The default value (for self::OPTIONAL mode only) + * @param string $name The argument name + * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid */ @@ -42,7 +42,7 @@ { if (null === $mode) { $mode = self::OPTIONAL; - } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { + } elseif (!\is_int($mode) || $mode > 7 || $mode < 1) { throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); } @@ -86,7 +86,7 @@ /** * Sets the default value. * - * @param mixed $default The default value + * @param string|string[]|null $default The default value * * @throws LogicException When incorrect default value is given */ @@ -98,8 +98,8 @@ if ($this->isArray()) { if (null === $default) { - $default = array(); - } elseif (!is_array($default)) { + $default = []; + } elseif (!\is_array($default)) { throw new LogicException('A default value for an array argument must be an array.'); } } @@ -110,7 +110,7 @@ /** * Returns the default value. * - * @return mixed The default value + * @return string|string[]|null The default value */ public function getDefault() {