upgrade to laravel 7 and set branch to v2
This commit is contained in:
39
vendor/symfony/console/Style/SymfonyStyle.php
vendored
39
vendor/symfony/console/Style/SymfonyStyle.php
vendored
@@ -58,13 +58,8 @@ class SymfonyStyle extends OutputStyle
|
||||
* Formats a message as a block of text.
|
||||
*
|
||||
* @param string|array $messages The message to write in the block
|
||||
* @param string|null $type The block type (added in [] on first line)
|
||||
* @param string|null $style The style to apply to the whole block
|
||||
* @param string $prefix The prefix for the block
|
||||
* @param bool $padding Whether to add vertical padding
|
||||
* @param bool $escape Whether to escape the message
|
||||
*/
|
||||
public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = true)
|
||||
public function block($messages, ?string $type = null, ?string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = true)
|
||||
{
|
||||
$messages = \is_array($messages) ? array_values($messages) : [$messages];
|
||||
|
||||
@@ -76,7 +71,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function title($message)
|
||||
public function title(string $message)
|
||||
{
|
||||
$this->autoPrependBlock();
|
||||
$this->writeln([
|
||||
@@ -89,7 +84,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function section($message)
|
||||
public function section(string $message)
|
||||
{
|
||||
$this->autoPrependBlock();
|
||||
$this->writeln([
|
||||
@@ -168,6 +163,16 @@ class SymfonyStyle extends OutputStyle
|
||||
$this->block($message, 'NOTE', 'fg=yellow', ' ! ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats an info message.
|
||||
*
|
||||
* @param string|array $message
|
||||
*/
|
||||
public function info($message)
|
||||
{
|
||||
$this->block($message, 'INFO', 'fg=green', ' ', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -259,7 +264,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function ask($question, $default = null, $validator = null)
|
||||
public function ask(string $question, ?string $default = null, $validator = null)
|
||||
{
|
||||
$question = new Question($question, $default);
|
||||
$question->setValidator($validator);
|
||||
@@ -270,7 +275,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function askHidden($question, $validator = null)
|
||||
public function askHidden(string $question, $validator = null)
|
||||
{
|
||||
$question = new Question($question);
|
||||
|
||||
@@ -291,7 +296,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function choice($question, array $choices, $default = null)
|
||||
public function choice(string $question, array $choices, $default = null)
|
||||
{
|
||||
if (null !== $default) {
|
||||
$values = array_flip($choices);
|
||||
@@ -304,7 +309,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function progressStart($max = 0)
|
||||
public function progressStart(int $max = 0)
|
||||
{
|
||||
$this->progressBar = $this->createProgressBar($max);
|
||||
$this->progressBar->start();
|
||||
@@ -313,7 +318,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function progressAdvance($step = 1)
|
||||
public function progressAdvance(int $step = 1)
|
||||
{
|
||||
$this->getProgressBar()->advance($step);
|
||||
}
|
||||
@@ -331,7 +336,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function createProgressBar($max = 0)
|
||||
public function createProgressBar(int $max = 0)
|
||||
{
|
||||
$progressBar = parent::createProgressBar($max);
|
||||
|
||||
@@ -370,7 +375,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function writeln($messages, $type = self::OUTPUT_NORMAL)
|
||||
public function writeln($messages, int $type = self::OUTPUT_NORMAL)
|
||||
{
|
||||
if (!is_iterable($messages)) {
|
||||
$messages = [$messages];
|
||||
@@ -385,7 +390,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL)
|
||||
public function write($messages, bool $newline = false, int $type = self::OUTPUT_NORMAL)
|
||||
{
|
||||
if (!is_iterable($messages)) {
|
||||
$messages = [$messages];
|
||||
@@ -400,7 +405,7 @@ class SymfonyStyle extends OutputStyle
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function newLine($count = 1)
|
||||
public function newLine(int $count = 1)
|
||||
{
|
||||
parent::newLine($count);
|
||||
$this->bufferedOutput->write(str_repeat("\n", $count));
|
||||
|
||||
Reference in New Issue
Block a user