From 83457e081a23b8fa31112c506d7e871c03136dea Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Wed, 12 Mar 2025 17:15:31 +0100 Subject: [PATCH] [CLEANUP] Avoid magic method forwarding in `Import` Part of #1147 --- config/phpstan-baseline.neon | 6 ------ src/Property/Import.php | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index 3f8363a23..531860683 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -96,12 +96,6 @@ parameters: count: 1 path: ../src/Property/Charset.php - - - message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#' - identifier: method.notFound - count: 1 - path: ../src/Property/Import.php - - message: '#^Only booleans are allowed in an if condition, string given\.$#' identifier: if.condNotBoolean diff --git a/src/Property/Import.php b/src/Property/Import.php index 41059738d..19bee1251 100644 --- a/src/Property/Import.php +++ b/src/Property/Import.php @@ -82,7 +82,7 @@ public function __toString(): string public function render(OutputFormat $outputFormat): string { - return $outputFormat->comments($this) . '@import ' . $this->location->render($outputFormat) + return $outputFormat->getFormatter()->comments($this) . '@import ' . $this->location->render($outputFormat) . ($this->mediaQuery === null ? '' : ' ' . $this->mediaQuery) . ';'; }