File tree Expand file tree Collapse file tree 2 files changed +6
-28
lines changed Expand file tree Collapse file tree 2 files changed +6
-28
lines changed Original file line number Diff line number Diff line change @@ -18,30 +18,6 @@ parameters:
18
18
count : 1
19
19
path : ../src/CSSList/CSSBlockList.php
20
20
21
- -
22
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:safely\(\)\.$#'
23
- identifier : method.notFound
24
- count : 1
25
- path : ../src/CSSList/CSSList.php
26
-
27
- -
28
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterBlocks\(\)\.$#'
29
- identifier : method.notFound
30
- count : 1
31
- path : ../src/CSSList/CSSList.php
32
-
33
- -
34
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeBlocks\(\)\.$#'
35
- identifier : method.notFound
36
- count : 1
37
- path : ../src/CSSList/CSSList.php
38
-
39
- -
40
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBetweenBlocks\(\)\.$#'
41
- identifier : method.notFound
42
- count : 1
43
- path : ../src/CSSList/CSSList.php
44
-
45
21
-
46
22
message : ' #^Loose comparison via "\!\=" is not allowed\.$#'
47
23
identifier : notEqual.notAllowed
Original file line number Diff line number Diff line change @@ -419,25 +419,27 @@ protected function renderListContents(OutputFormat $outputFormat)
419
419
if (!$ this ->isRootList ()) {
420
420
$ nextLevelFormat = $ outputFormat ->nextLevel ();
421
421
}
422
+ $ nextLevelFormatter = $ nextLevelFormat ->getFormatter ();
423
+ $ formatter = $ outputFormat ->getFormatter ();
422
424
foreach ($ this ->contents as $ listItem ) {
423
- $ renderedCss = $ outputFormat ->safely (static function () use ($ nextLevelFormat , $ listItem ): string {
425
+ $ renderedCss = $ formatter ->safely (static function () use ($ nextLevelFormat , $ listItem ): string {
424
426
return $ listItem ->render ($ nextLevelFormat );
425
427
});
426
428
if ($ renderedCss === null ) {
427
429
continue ;
428
430
}
429
431
if ($ isFirst ) {
430
432
$ isFirst = false ;
431
- $ result .= $ nextLevelFormat ->spaceBeforeBlocks ();
433
+ $ result .= $ nextLevelFormatter ->spaceBeforeBlocks ();
432
434
} else {
433
- $ result .= $ nextLevelFormat ->spaceBetweenBlocks ();
435
+ $ result .= $ nextLevelFormatter ->spaceBetweenBlocks ();
434
436
}
435
437
$ result .= $ renderedCss ;
436
438
}
437
439
438
440
if (!$ isFirst ) {
439
441
// Had some output
440
- $ result .= $ outputFormat ->spaceAfterBlocks ();
442
+ $ result .= $ formatter ->spaceAfterBlocks ();
441
443
}
442
444
443
445
return $ result ;
You can’t perform that action at this time.
0 commit comments