This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -21,7 +21,7 @@ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
return $text;
}
public function setBackground(string $color = null): void
public function setBackground(?string $color = null): void
{
if (1 > \func_num_args()) {
trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
@@ -29,7 +29,7 @@ final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
// do nothing
}
public function setForeground(string $color = null): void
public function setForeground(?string $color = null): void
{
if (1 > \func_num_args()) {
trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);

View File

@@ -33,7 +33,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
* @param string|null $foreground The style foreground color name
* @param string|null $background The style background color name
*/
public function __construct(string $foreground = null, string $background = null, array $options = [])
public function __construct(?string $foreground = null, ?string $background = null, array $options = [])
{
$this->color = new Color($this->foreground = $foreground ?: '', $this->background = $background ?: '', $this->options = $options);
}
@@ -41,7 +41,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* @return void
*/
public function setForeground(string $color = null)
public function setForeground(?string $color = null)
{
if (1 > \func_num_args()) {
trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);
@@ -52,7 +52,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
/**
* @return void
*/
public function setBackground(string $color = null)
public function setBackground(?string $color = null)
{
if (1 > \func_num_args()) {
trigger_deprecation('symfony/console', '6.2', 'Calling "%s()" without any arguments is deprecated, pass null explicitly instead.', __METHOD__);

View File

@@ -26,7 +26,7 @@ class OutputFormatterStyleStack implements ResetInterface
private OutputFormatterStyleInterface $emptyStyle;
public function __construct(OutputFormatterStyleInterface $emptyStyle = null)
public function __construct(?OutputFormatterStyleInterface $emptyStyle = null)
{
$this->emptyStyle = $emptyStyle ?? new OutputFormatterStyle();
$this->reset();
@@ -57,7 +57,7 @@ class OutputFormatterStyleStack implements ResetInterface
*
* @throws InvalidArgumentException When style tags incorrectly nested
*/
public function pop(OutputFormatterStyleInterface $style = null): OutputFormatterStyleInterface
public function pop(?OutputFormatterStyleInterface $style = null): OutputFormatterStyleInterface
{
if (!$this->styles) {
return $this->emptyStyle;