🔧
This commit is contained in:
@@ -91,12 +91,12 @@ interface StyleInterface
|
||||
/**
|
||||
* Asks a question.
|
||||
*/
|
||||
public function ask(string $question, string $default = null, callable $validator = null): mixed;
|
||||
public function ask(string $question, ?string $default = null, ?callable $validator = null): mixed;
|
||||
|
||||
/**
|
||||
* Asks a question with the user input hidden.
|
||||
*/
|
||||
public function askHidden(string $question, callable $validator = null): mixed;
|
||||
public function askHidden(string $question, ?callable $validator = null): mixed;
|
||||
|
||||
/**
|
||||
* Asks for confirmation.
|
||||
|
||||
10
vendor/symfony/console/Style/SymfonyStyle.php
vendored
10
vendor/symfony/console/Style/SymfonyStyle.php
vendored
@@ -63,7 +63,7 @@ class SymfonyStyle extends OutputStyle
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function block(string|array $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
|
||||
public function block(string|array $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
|
||||
{
|
||||
$messages = \is_array($messages) ? array_values($messages) : [$messages];
|
||||
|
||||
@@ -249,7 +249,7 @@ class SymfonyStyle extends OutputStyle
|
||||
$this->horizontalTable($headers, [$row]);
|
||||
}
|
||||
|
||||
public function ask(string $question, string $default = null, callable $validator = null): mixed
|
||||
public function ask(string $question, ?string $default = null, ?callable $validator = null): mixed
|
||||
{
|
||||
$question = new Question($question, $default);
|
||||
$question->setValidator($validator);
|
||||
@@ -257,7 +257,7 @@ class SymfonyStyle extends OutputStyle
|
||||
return $this->askQuestion($question);
|
||||
}
|
||||
|
||||
public function askHidden(string $question, callable $validator = null): mixed
|
||||
public function askHidden(string $question, ?callable $validator = null): mixed
|
||||
{
|
||||
$question = new Question($question);
|
||||
|
||||
@@ -336,7 +336,7 @@ class SymfonyStyle extends OutputStyle
|
||||
*
|
||||
* @return iterable<TKey, TValue>
|
||||
*/
|
||||
public function progressIterate(iterable $iterable, int $max = null): iterable
|
||||
public function progressIterate(iterable $iterable, ?int $max = null): iterable
|
||||
{
|
||||
yield from $this->createProgressBar()->iterate($iterable, $max);
|
||||
|
||||
@@ -456,7 +456,7 @@ class SymfonyStyle extends OutputStyle
|
||||
$this->bufferedOutput->write($message, $newLine, $type);
|
||||
}
|
||||
|
||||
private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
|
||||
private function createBlock(iterable $messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false): array
|
||||
{
|
||||
$indentLength = 0;
|
||||
$prefixLength = Helper::width(Helper::removeDecoration($this->getFormatter(), $prefix));
|
||||
|
||||
Reference in New Issue
Block a user