Skip to content

Commit 831f3d9

Browse files
authored
[CLEANUP] Avoid magic method forwarding in KeyFrame (#1158)
Part of #1147
1 parent b0238f0 commit 831f3d9

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

config/phpstan-baseline.neon

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ parameters:
4242
count: 1
4343
path: ../src/CSSList/Document.php
4444

45-
-
46-
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
47-
identifier: method.notFound
48-
count: 1
49-
path: ../src/CSSList/KeyFrame.php
50-
51-
-
52-
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
53-
identifier: method.notFound
54-
count: 1
55-
path: ../src/CSSList/KeyFrame.php
56-
5745
-
5846
message: '#^Loose comparison via "\=\=" is not allowed\.$#'
5947
identifier: equal.notAllowed

src/CSSList/KeyFrame.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ public function __toString(): string
6161

6262
public function render(OutputFormat $outputFormat): string
6363
{
64-
$result = $outputFormat->comments($this);
65-
$result .= "@{$this->vendorKeyFrame} {$this->animationName}{$outputFormat->spaceBeforeOpeningBrace()}{";
64+
$formatter = $outputFormat->getFormatter();
65+
$result = $formatter->comments($this);
66+
$result .= "@{$this->vendorKeyFrame} {$this->animationName}{$formatter->spaceBeforeOpeningBrace()}{";
6667
$result .= $this->renderListContents($outputFormat);
6768
$result .= '}';
6869
return $result;

0 commit comments

Comments
 (0)