File tree Expand file tree Collapse file tree 2 files changed +6
-34
lines changed Expand file tree Collapse file tree 2 files changed +6
-34
lines changed Original file line number Diff line number Diff line change @@ -102,36 +102,6 @@ parameters:
102
102
count : 1
103
103
path : ../src/RuleSet/AtRuleSet.php
104
104
105
- -
106
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
107
- identifier : method.notFound
108
- count : 1
109
- path : ../src/RuleSet/DeclarationBlock.php
110
-
111
- -
112
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:implode\(\)\.$#'
113
- identifier : method.notFound
114
- count : 1
115
- path : ../src/RuleSet/DeclarationBlock.php
116
-
117
- -
118
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterSelectorSeparator\(\)\.$#'
119
- identifier : method.notFound
120
- count : 1
121
- path : ../src/RuleSet/DeclarationBlock.php
122
-
123
- -
124
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
125
- identifier : method.notFound
126
- count : 1
127
- path : ../src/RuleSet/DeclarationBlock.php
128
-
129
- -
130
- message : ' #^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeSelectorSeparator\(\)\.$#'
131
- identifier : method.notFound
132
- count : 1
133
- path : ../src/RuleSet/DeclarationBlock.php
134
-
135
105
-
136
106
message : ' #^Loose comparison via "\!\=" is not allowed\.$#'
137
107
identifier : notEqual.notAllowed
Original file line number Diff line number Diff line change @@ -155,21 +155,23 @@ public function __toString(): string
155
155
*/
156
156
public function render (OutputFormat $ outputFormat ): string
157
157
{
158
- $ result = $ outputFormat ->comments ($ this );
158
+ $ formatter = $ outputFormat ->getFormatter ();
159
+ $ result = $ formatter ->comments ($ this );
159
160
if (\count ($ this ->selectors ) === 0 ) {
160
161
// If all the selectors have been removed, this declaration block becomes invalid
161
162
throw new OutputException ('Attempt to print declaration block with missing selector ' , $ this ->lineNumber );
162
163
}
163
164
$ result .= $ outputFormat ->getContentBeforeDeclarationBlock ();
164
- $ result .= $ outputFormat ->implode (
165
- $ outputFormat ->spaceBeforeSelectorSeparator () . ', ' . $ outputFormat ->spaceAfterSelectorSeparator (),
165
+ $ result .= $ formatter ->implode (
166
+ $ formatter ->spaceBeforeSelectorSeparator () . ', ' . $ formatter ->spaceAfterSelectorSeparator (),
166
167
$ this ->selectors
167
168
);
168
169
$ result .= $ outputFormat ->getContentAfterDeclarationBlockSelectors ();
169
- $ result .= $ outputFormat ->spaceBeforeOpeningBrace () . '{ ' ;
170
+ $ result .= $ formatter ->spaceBeforeOpeningBrace () . '{ ' ;
170
171
$ result .= $ this ->renderRules ($ outputFormat );
171
172
$ result .= '} ' ;
172
173
$ result .= $ outputFormat ->getContentAfterDeclarationBlock ();
174
+
173
175
return $ result ;
174
176
}
175
177
}
You can’t perform that action at this time.
0 commit comments