From 2a0fd110d77207711023b2fb43f0c5700af8876d Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sat, 25 Jan 2025 22:15:32 +0100 Subject: [PATCH] [BUGFIX] Create `Size` with correct types in `expandBackgroundShorthand` --- config/phpstan-baseline.neon | 6 ------ src/RuleSet/DeclarationBlock.php | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index a01c9a6c..b87bfdfa 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -6,12 +6,6 @@ parameters: count: 2 path: ../src/OutputFormat.php - - - message: '#^Class Sabberworm\\CSS\\Value\\Size constructor invoked with 5 parameters, 1\-4 required\.$#' - identifier: arguments.count - count: 2 - path: ../src/RuleSet/DeclarationBlock.php - - message: '#^@covers value \\Sabberworm\\CSS\\Value\\Value\:\:parseValue\(\) references an invalid method\.$#' identifier: phpunit.coversMethod diff --git a/src/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php index f701c1ec..4a26e6d5 100644 --- a/src/RuleSet/DeclarationBlock.php +++ b/src/RuleSet/DeclarationBlock.php @@ -396,8 +396,8 @@ public function expandBackgroundShorthand(): void 'background-repeat' => ['repeat'], 'background-attachment' => ['scroll'], 'background-position' => [ - new Size(0, '%', null, false, $this->iLineNo), - new Size(0, '%', null, false, $this->iLineNo), + new Size(0, '%', false, $this->iLineNo), + new Size(0, '%', false, $this->iLineNo), ], ]; $mRuleValue = $oRule->getValue();