Aggiornato Composer
This commit is contained in:
2
vendor/symfony/console/Input/ArgvInput.php
vendored
2
vendor/symfony/console/Input/ArgvInput.php
vendored
@@ -43,7 +43,7 @@ class ArgvInput extends Input
|
||||
private $tokens;
|
||||
private $parsed;
|
||||
|
||||
public function __construct(array $argv = null, InputDefinition $definition = null)
|
||||
public function __construct(?array $argv = null, ?InputDefinition $definition = null)
|
||||
{
|
||||
$argv = $argv ?? $_SERVER['argv'] ?? [];
|
||||
|
||||
|
||||
2
vendor/symfony/console/Input/ArrayInput.php
vendored
2
vendor/symfony/console/Input/ArrayInput.php
vendored
@@ -27,7 +27,7 @@ class ArrayInput extends Input
|
||||
{
|
||||
private $parameters;
|
||||
|
||||
public function __construct(array $parameters, InputDefinition $definition = null)
|
||||
public function __construct(array $parameters, ?InputDefinition $definition = null)
|
||||
{
|
||||
$this->parameters = $parameters;
|
||||
|
||||
|
||||
2
vendor/symfony/console/Input/Input.php
vendored
2
vendor/symfony/console/Input/Input.php
vendored
@@ -33,7 +33,7 @@ abstract class Input implements InputInterface, StreamableInputInterface
|
||||
protected $arguments = [];
|
||||
protected $interactive = true;
|
||||
|
||||
public function __construct(InputDefinition $definition = null)
|
||||
public function __construct(?InputDefinition $definition = null)
|
||||
{
|
||||
if (null === $definition) {
|
||||
$this->definition = new InputDefinition();
|
||||
|
||||
@@ -32,13 +32,13 @@ class InputArgument
|
||||
|
||||
/**
|
||||
* @param string $name The argument name
|
||||
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
|
||||
* @param int|null $mode The argument mode: a bit mask of self::REQUIRED, self::OPTIONAL and self::IS_ARRAY
|
||||
* @param string $description A description text
|
||||
* @param string|bool|int|float|array|null $default The default value (for self::OPTIONAL mode only)
|
||||
*
|
||||
* @throws InvalidArgumentException When argument mode is not valid
|
||||
*/
|
||||
public function __construct(string $name, int $mode = null, string $description = '', $default = null)
|
||||
public function __construct(string $name, ?int $mode = null, string $description = '', $default = null)
|
||||
{
|
||||
if (null === $mode) {
|
||||
$mode = self::OPTIONAL;
|
||||
@@ -92,7 +92,7 @@ class InputArgument
|
||||
*/
|
||||
public function setDefault($default = null)
|
||||
{
|
||||
if (self::REQUIRED === $this->mode && null !== $default) {
|
||||
if ($this->isRequired() && null !== $default) {
|
||||
throw new LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.');
|
||||
}
|
||||
|
||||
|
||||
8
vendor/symfony/console/Input/InputOption.php
vendored
8
vendor/symfony/console/Input/InputOption.php
vendored
@@ -59,7 +59,7 @@ class InputOption
|
||||
*
|
||||
* @throws InvalidArgumentException If option mode is invalid or incompatible
|
||||
*/
|
||||
public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null)
|
||||
public function __construct(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null)
|
||||
{
|
||||
if (str_starts_with($name, '--')) {
|
||||
$name = substr($name, 2);
|
||||
@@ -69,7 +69,7 @@ class InputOption
|
||||
throw new InvalidArgumentException('An option name cannot be empty.');
|
||||
}
|
||||
|
||||
if (empty($shortcut)) {
|
||||
if ('' === $shortcut || [] === $shortcut || false === $shortcut) {
|
||||
$shortcut = null;
|
||||
}
|
||||
|
||||
@@ -78,10 +78,10 @@ class InputOption
|
||||
$shortcut = implode('|', $shortcut);
|
||||
}
|
||||
$shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-'));
|
||||
$shortcuts = array_filter($shortcuts);
|
||||
$shortcuts = array_filter($shortcuts, 'strlen');
|
||||
$shortcut = implode('|', $shortcuts);
|
||||
|
||||
if (empty($shortcut)) {
|
||||
if ('' === $shortcut) {
|
||||
throw new InvalidArgumentException('An option shortcut cannot be empty.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user