@@ -172,18 +172,19 @@ public static function parsePrimitiveValue(ParserState $parserState)
172
172
} elseif ($ parserState ->comes ('U+ ' )) {
173
173
$ value = self ::parseUnicodeRangeValue ($ parserState );
174
174
} else {
175
- $ sNextChar = $ parserState ->peek (1 );
175
+ $ nextCharacter = $ parserState ->peek (1 );
176
176
try {
177
177
$ value = self ::parseIdentifierOrFunction ($ parserState );
178
178
} catch (UnexpectedTokenException $ e ) {
179
- if (\in_array ($ sNextChar , ['+ ' , '- ' , '* ' , '/ ' ], true )) {
179
+ if (\in_array ($ nextCharacter , ['+ ' , '- ' , '* ' , '/ ' ], true )) {
180
180
$ value = $ parserState ->consume (1 );
181
181
} else {
182
182
throw $ e ;
183
183
}
184
184
}
185
185
}
186
186
$ parserState ->consumeWhiteSpace ();
187
+
187
188
return $ value ;
188
189
}
189
190
@@ -204,16 +205,17 @@ private static function parseMicrosoftFilter(ParserState $parserState): CSSFunct
204
205
*/
205
206
private static function parseUnicodeRangeValue (ParserState $ parserState ): string
206
207
{
207
- $ iCodepointMaxLength = 6 ; // Code points outside BMP can use up to six digits
208
- $ sRange = '' ;
208
+ $ codepointMaxLength = 6 ; // Code points outside BMP can use up to six digits
209
+ $ range = '' ;
209
210
$ parserState ->consume ('U+ ' );
210
211
do {
211
212
if ($ parserState ->comes ('- ' )) {
212
- $ iCodepointMaxLength = 13 ; // Max length is 2 six-digit code points + the dash(-) between them
213
+ $ codepointMaxLength = 13 ; // Max length is 2 six-digit code points + the dash(-) between them
213
214
}
214
- $ sRange .= $ parserState ->consume (1 );
215
- } while (\strlen ($ sRange ) < $ iCodepointMaxLength && \preg_match ('/[A-Fa-f0-9 \\?-]/ ' , $ parserState ->peek ()));
216
- return "U+ {$ sRange }" ;
215
+ $ range .= $ parserState ->consume (1 );
216
+ } while (\strlen ($ range ) < $ codepointMaxLength && \preg_match ('/[A-Fa-f0-9 \\?-]/ ' , $ parserState ->peek ()));
217
+
218
+ return "U+ {$ range }" ;
217
219
}
218
220
219
221
/**
0 commit comments