File tree Expand file tree Collapse file tree 2 files changed +7
-35
lines changed Expand file tree Collapse file tree 2 files changed +7
-35
lines changed Original file line number Diff line number Diff line change @@ -156,36 +156,6 @@ parameters:
156
156
count : 1
157
157
path : ../src/RuleSet/DeclarationBlock.php
158
158
159
- -
160
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:removeLastSemicolon\(\)\.$#'
161
- identifier : method.notFound
162
- count : 1
163
- path : ../src/RuleSet/RuleSet.php
164
-
165
- -
166
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:safely\(\)\.$#'
167
- identifier : method.notFound
168
- count : 1
169
- path : ../src/RuleSet/RuleSet.php
170
-
171
- -
172
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterRules\(\)\.$#'
173
- identifier : method.notFound
174
- count : 1
175
- path : ../src/RuleSet/RuleSet.php
176
-
177
- -
178
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeRules\(\)\.$#'
179
- identifier : method.notFound
180
- count : 1
181
- path : ../src/RuleSet/RuleSet.php
182
-
183
- -
184
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBetweenRules\(\)\.$#'
185
- identifier : method.notFound
186
- count : 1
187
- path : ../src/RuleSet/RuleSet.php
188
-
189
159
-
190
160
message : ' #^Only booleans are allowed in a negated boolean, string\|null given\.$#'
191
161
identifier : booleanNot.exprNotBoolean
Original file line number Diff line number Diff line change @@ -278,27 +278,29 @@ protected function renderRules(OutputFormat $outputFormat)
278
278
$ isFirst = true ;
279
279
$ nextLevelFormat = $ outputFormat ->nextLevel ();
280
280
foreach ($ this ->getRules () as $ rule ) {
281
- $ renderedRule = $ nextLevelFormat ->safely (static function () use ($ rule , $ nextLevelFormat ): string {
281
+ $ nextLevelFormatter = $ nextLevelFormat ->getFormatter ();
282
+ $ renderedRule = $ nextLevelFormatter ->safely (static function () use ($ rule , $ nextLevelFormat ): string {
282
283
return $ rule ->render ($ nextLevelFormat );
283
284
});
284
285
if ($ renderedRule === null ) {
285
286
continue ;
286
287
}
287
288
if ($ isFirst ) {
288
289
$ isFirst = false ;
289
- $ result .= $ nextLevelFormat ->spaceBeforeRules ();
290
+ $ result .= $ nextLevelFormatter ->spaceBeforeRules ();
290
291
} else {
291
- $ result .= $ nextLevelFormat ->spaceBetweenRules ();
292
+ $ result .= $ nextLevelFormatter ->spaceBetweenRules ();
292
293
}
293
294
$ result .= $ renderedRule ;
294
295
}
295
296
297
+ $ formatter = $ outputFormat ->getFormatter ();
296
298
if (!$ isFirst ) {
297
299
// Had some output
298
- $ result .= $ outputFormat ->spaceAfterRules ();
300
+ $ result .= $ formatter ->spaceAfterRules ();
299
301
}
300
302
301
- return $ outputFormat ->removeLastSemicolon ($ result );
303
+ return $ formatter ->removeLastSemicolon ($ result );
302
304
}
303
305
304
306
/**
You can’t perform that action at this time.
0 commit comments