Skip to content

Commit 74dd4a7

Browse files
authored
[CLEANUP] Avoid Hungarian notation for function (#1070)
Part of #756
1 parent 8798bf4 commit 74dd4a7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Value/CalcFunction.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class CalcFunction extends CSSFunction
2929
public static function parse(ParserState $parserState, bool $ignoreCase = false): CSSFunction
3030
{
3131
$aOperators = ['+', '-', '*', '/'];
32-
$sFunction = $parserState->parseIdentifier();
32+
$function = $parserState->parseIdentifier();
3333
if ($parserState->peek() != '(') {
3434
// Found ; or end of line before an opening bracket
3535
throw new UnexpectedTokenException('(', $parserState->peek(), 'literal', $parserState->currentLine());
36-
} elseif (!\in_array($sFunction, ['calc', '-moz-calc', '-webkit-calc'], true)) {
36+
} elseif (!\in_array($function, ['calc', '-moz-calc', '-webkit-calc'], true)) {
3737
// Found invalid calc definition. Example calc (...
38-
throw new UnexpectedTokenException('calc', $sFunction, 'literal', $parserState->currentLine());
38+
throw new UnexpectedTokenException('calc', $function, 'literal', $parserState->currentLine());
3939
}
4040
$parserState->consume('(');
4141
$oCalcList = new CalcRuleValueList($parserState->currentLine());
@@ -100,6 +100,6 @@ public static function parse(ParserState $parserState, bool $ignoreCase = false)
100100
if (!$parserState->isEnd()) {
101101
$parserState->consume(')');
102102
}
103-
return new CalcFunction($sFunction, $list, ',', $parserState->currentLine());
103+
return new CalcFunction($function, $list, ',', $parserState->currentLine());
104104
}
105105
}

src/Value/Value.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ public static function parsePrimitiveValue(ParserState $parserState)
193193
*/
194194
private static function parseMicrosoftFilter(ParserState $parserState): CSSFunction
195195
{
196-
$sFunction = $parserState->consumeUntil('(', false, true);
196+
$function = $parserState->consumeUntil('(', false, true);
197197
$arguments = Value::parseValue($parserState, [',', '=']);
198-
return new CSSFunction($sFunction, $arguments, ',', $parserState->currentLine());
198+
return new CSSFunction($function, $arguments, ',', $parserState->currentLine());
199199
}
200200

201201
/**

0 commit comments

Comments
 (0)