Skip to content

Commit c2d2bb4

Browse files
authored
[CLEANUP] Avoid Hungarian notation in Value (#1069)
Part of #756
1 parent 8dcc1a5 commit c2d2bb4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/Value/Value.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,19 @@ public static function parsePrimitiveValue(ParserState $parserState)
172172
} elseif ($parserState->comes('U+')) {
173173
$value = self::parseUnicodeRangeValue($parserState);
174174
} else {
175-
$sNextChar = $parserState->peek(1);
175+
$nextCharacter = $parserState->peek(1);
176176
try {
177177
$value = self::parseIdentifierOrFunction($parserState);
178178
} catch (UnexpectedTokenException $e) {
179-
if (\in_array($sNextChar, ['+', '-', '*', '/'], true)) {
179+
if (\in_array($nextCharacter, ['+', '-', '*', '/'], true)) {
180180
$value = $parserState->consume(1);
181181
} else {
182182
throw $e;
183183
}
184184
}
185185
}
186186
$parserState->consumeWhiteSpace();
187+
187188
return $value;
188189
}
189190

@@ -204,16 +205,17 @@ private static function parseMicrosoftFilter(ParserState $parserState): CSSFunct
204205
*/
205206
private static function parseUnicodeRangeValue(ParserState $parserState): string
206207
{
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 = '';
209210
$parserState->consume('U+');
210211
do {
211212
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
213214
}
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}";
217219
}
218220

219221
/**

0 commit comments

Comments
 (0)