Skip to content

Commit 7144fde

Browse files
authored
[CLEANUP] Avoid magic method forwarding in Document (#1155)
Part of #1147
1 parent 230fd2a commit 7144fde

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

config/phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ parameters:
3636
count: 1
3737
path: ../src/CSSList/CSSList.php
3838

39-
-
40-
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
41-
identifier: method.notFound
42-
count: 1
43-
path: ../src/CSSList/Document.php
44-
4539
-
4640
message: '#^Parameters should have "string\|null" types as the only types passed to this method$#'
4741
identifier: typePerfect.narrowPublicClassMethodParamType

src/CSSList/Document.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function render(?OutputFormat $outputFormat = null): string
8686
if ($outputFormat === null) {
8787
$outputFormat = new OutputFormat();
8888
}
89-
return $outputFormat->comments($this) . $this->renderListContents($outputFormat);
89+
return $outputFormat->getFormatter()->comments($this) . $this->renderListContents($outputFormat);
9090
}
9191

9292
public function isRootList(): bool

0 commit comments

Comments
 (0)