diff --git a/config/phpstan-baseline.neon b/config/phpstan-baseline.neon index 00d29d049..01b5d708f 100644 --- a/config/phpstan-baseline.neon +++ b/config/phpstan-baseline.neon @@ -42,18 +42,6 @@ parameters: count: 1 path: ../src/CSSList/Document.php - - - message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#' - identifier: method.notFound - count: 1 - path: ../src/CSSList/KeyFrame.php - - - - message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#' - identifier: method.notFound - count: 1 - path: ../src/CSSList/KeyFrame.php - - message: '#^Loose comparison via "\=\=" is not allowed\.$#' identifier: equal.notAllowed diff --git a/src/CSSList/KeyFrame.php b/src/CSSList/KeyFrame.php index 40e0823dc..12d79804f 100644 --- a/src/CSSList/KeyFrame.php +++ b/src/CSSList/KeyFrame.php @@ -61,8 +61,9 @@ public function __toString(): string public function render(OutputFormat $outputFormat): string { - $result = $outputFormat->comments($this); - $result .= "@{$this->vendorKeyFrame} {$this->animationName}{$outputFormat->spaceBeforeOpeningBrace()}{"; + $formatter = $outputFormat->getFormatter(); + $result = $formatter->comments($this); + $result .= "@{$this->vendorKeyFrame} {$this->animationName}{$formatter->spaceBeforeOpeningBrace()}{"; $result .= $this->renderListContents($outputFormat); $result .= '}'; return $result;