upgraded dependencies

This commit is contained in:
RafficMohammed
2023-01-08 01:59:16 +05:30
parent 51056e3aad
commit f9ae387337
6895 changed files with 133617 additions and 178680 deletions

View File

@@ -36,11 +36,9 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* Escapes "<" and ">" special chars in given text.
*
* @param string $text Text to escape
*
* @return string Escaped text
* @return string
*/
public static function escape($text)
public static function escape(string $text)
{
$text = preg_replace('/([^\\\\]|^)([<>])/', '$1\\\\$2', $text);
@@ -88,9 +86,9 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* {@inheritdoc}
*/
public function setDecorated($decorated)
public function setDecorated(bool $decorated)
{
$this->decorated = (bool) $decorated;
$this->decorated = $decorated;
}
/**
@@ -104,7 +102,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* {@inheritdoc}
*/
public function setStyle($name, OutputFormatterStyleInterface $style)
public function setStyle(string $name, OutputFormatterStyleInterface $style)
{
$this->styles[strtolower($name)] = $style;
}
@@ -112,7 +110,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* {@inheritdoc}
*/
public function hasStyle($name)
public function hasStyle(string $name)
{
return isset($this->styles[strtolower($name)]);
}
@@ -120,7 +118,7 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* {@inheritdoc}
*/
public function getStyle($name)
public function getStyle(string $name)
{
if (!$this->hasStyle($name)) {
throw new InvalidArgumentException(sprintf('Undefined style: "%s".', $name));
@@ -132,16 +130,20 @@ class OutputFormatter implements WrappableOutputFormatterInterface
/**
* {@inheritdoc}
*/
public function format($message)
public function format(?string $message)
{
return $this->formatAndWrap((string) $message, 0);
return $this->formatAndWrap($message, 0);
}
/**
* {@inheritdoc}
*/
public function formatAndWrap(string $message, int $width)
public function formatAndWrap(?string $message, int $width)
{
if (null === $message) {
return '';
}
$offset = 0;
$output = '';
$openTagRegex = '[a-z](?:[^\\\\<>]*+ | \\\\.)*';