diff --git a/src/OutputFormat.php b/src/OutputFormat.php index b65986bb..d7f1a096 100644 --- a/src/OutputFormat.php +++ b/src/OutputFormat.php @@ -199,11 +199,11 @@ public function get(string $sName) /** * @param array|string $aNames - * @param mixed $mValue + * @param mixed $value * * @return self|false */ - public function set($aNames, $mValue) + public function set($aNames, $value) { $aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i']; if (\is_string($aNames) && \strpos($aNames, '*') !== false) { @@ -221,7 +221,7 @@ public function set($aNames, $mValue) foreach ($aNames as $sName) { $sFieldName = $prefix . \ucfirst($sName); if (isset($this->$sFieldName)) { - $this->$sFieldName = $mValue; + $this->$sFieldName = $value; $bDidReplace = true; } } diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 2100ed35..484006ce 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -251,35 +251,35 @@ public function peek($length = 1, $offset = 0): string } /** - * @param int $mValue + * @param int $value * * @throws UnexpectedEOFException * @throws UnexpectedTokenException */ - public function consume($mValue = 1): string + public function consume($value = 1): string { - if (\is_string($mValue)) { - $iLineCount = \substr_count($mValue, "\n"); - $length = $this->strlen($mValue); - if (!$this->streql($this->substr($this->currentPosition, $length), $mValue)) { + if (\is_string($value)) { + $iLineCount = \substr_count($value, "\n"); + $length = $this->strlen($value); + if (!$this->streql($this->substr($this->currentPosition, $length), $value)) { throw new UnexpectedTokenException( - $mValue, + $value, $this->peek(\max($length, 5)), 'literal', $this->lineNumber ); } $this->lineNumber += $iLineCount; - $this->currentPosition += $this->strlen($mValue); - return $mValue; + $this->currentPosition += $this->strlen($value); + return $value; } else { - if ($this->currentPosition + $mValue > \count($this->characters)) { - throw new UnexpectedEOFException((string) $mValue, $this->peek(5), 'count', $this->lineNumber); + if ($this->currentPosition + $value > \count($this->characters)) { + throw new UnexpectedEOFException((string) $value, $this->peek(5), 'count', $this->lineNumber); } - $result = $this->substr($this->currentPosition, $mValue); + $result = $this->substr($this->currentPosition, $value); $iLineCount = \substr_count($result, "\n"); $this->lineNumber += $iLineCount; - $this->currentPosition += $mValue; + $this->currentPosition += $value; return $result; } } diff --git a/src/Rule/Rule.php b/src/Rule/Rule.php index 0ec26902..792371a1 100644 --- a/src/Rule/Rule.php +++ b/src/Rule/Rule.php @@ -177,11 +177,11 @@ public function getValue() } /** - * @param RuleValueList|string|null $mValue + * @param RuleValueList|string|null $value */ - public function setValue($mValue): void + public function setValue($value): void { - $this->value = $mValue; + $this->value = $value; } /** diff --git a/src/Value/CalcFunction.php b/src/Value/CalcFunction.php index b2eaa35f..c3ab02ff 100644 --- a/src/Value/CalcFunction.php +++ b/src/Value/CalcFunction.php @@ -60,8 +60,8 @@ public static function parse(ParserState $parserState, bool $ignoreCase = false) continue; } if ($lastComponentType != CalcFunction::T_OPERAND) { - $oVal = Value::parsePrimitiveValue($parserState); - $calcRuleValueList->addListComponent($oVal); + $value = Value::parsePrimitiveValue($parserState); + $calcRuleValueList->addListComponent($value); $lastComponentType = CalcFunction::T_OPERAND; } else { if (\in_array($parserState->peek(), $operators, true)) {