From da7f958f1d1818f21b03374e1911203cb4f0b086 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 12 Mar 2025 18:50:46 +0100 Subject: [PATCH] [CLEANUP] Avoid magic method forwarding in `Charset` Part of #1147 --- config/phpstan-baseline.neon | 6 ------ src/Property/Charset.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index b527ad4b..29a0e5c7 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -66,12 +66,6 @@ parameters: count: 1 path: ../src/Property/CSSNamespace.php - - - message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#' - identifier: method.notFound - count: 1 - path: ../src/Property/Charset.php - - message: '#^Method Sabberworm\\CSS\\Property\\Charset\:\:atRuleArgs\(\) should return string but returns Sabberworm\\CSS\\Value\\CSSString\.$#' identifier: return.type diff --git a/src/Property/Charset.php b/src/Property/Charset.php index 97510a1c..61d4fbc9 100644 --- a/src/Property/Charset.php +++ b/src/Property/Charset.php @@ -81,7 +81,7 @@ public function __toString(): string public function render(OutputFormat $outputFormat): string { - return "{$outputFormat->comments($this)}@charset {$this->charset->render($outputFormat)};"; + return "{$outputFormat->getFormatter()->comments($this)}@charset {$this->charset->render($outputFormat)};"; } /**