Skip to content

Commit 8673538

Browse files
committed
[CLEANUP] Avoid Hungarian notation for value
Part of #756
1 parent 4b1e79d commit 8673538

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

src/OutputFormat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ public function get(string $sName)
199199

200200
/**
201201
* @param array<array-key, string>|string $aNames
202-
* @param mixed $mValue
202+
* @param mixed $value
203203
*
204204
* @return self|false
205205
*/
206-
public function set($aNames, $mValue)
206+
public function set($aNames, $value)
207207
{
208208
$aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
209209
if (\is_string($aNames) && \strpos($aNames, '*') !== false) {
@@ -221,7 +221,7 @@ public function set($aNames, $mValue)
221221
foreach ($aNames as $sName) {
222222
$sFieldName = $prefix . \ucfirst($sName);
223223
if (isset($this->$sFieldName)) {
224-
$this->$sFieldName = $mValue;
224+
$this->$sFieldName = $value;
225225
$bDidReplace = true;
226226
}
227227
}

src/Parsing/ParserState.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -251,35 +251,35 @@ public function peek($length = 1, $offset = 0): string
251251
}
252252

253253
/**
254-
* @param int $mValue
254+
* @param int $value
255255
*
256256
* @throws UnexpectedEOFException
257257
* @throws UnexpectedTokenException
258258
*/
259-
public function consume($mValue = 1): string
259+
public function consume($value = 1): string
260260
{
261-
if (\is_string($mValue)) {
262-
$iLineCount = \substr_count($mValue, "\n");
263-
$length = $this->strlen($mValue);
264-
if (!$this->streql($this->substr($this->currentPosition, $length), $mValue)) {
261+
if (\is_string($value)) {
262+
$iLineCount = \substr_count($value, "\n");
263+
$length = $this->strlen($value);
264+
if (!$this->streql($this->substr($this->currentPosition, $length), $value)) {
265265
throw new UnexpectedTokenException(
266-
$mValue,
266+
$value,
267267
$this->peek(\max($length, 5)),
268268
'literal',
269269
$this->lineNumber
270270
);
271271
}
272272
$this->lineNumber += $iLineCount;
273-
$this->currentPosition += $this->strlen($mValue);
274-
return $mValue;
273+
$this->currentPosition += $this->strlen($value);
274+
return $value;
275275
} else {
276-
if ($this->currentPosition + $mValue > \count($this->characters)) {
277-
throw new UnexpectedEOFException((string) $mValue, $this->peek(5), 'count', $this->lineNumber);
276+
if ($this->currentPosition + $value > \count($this->characters)) {
277+
throw new UnexpectedEOFException((string) $value, $this->peek(5), 'count', $this->lineNumber);
278278
}
279-
$result = $this->substr($this->currentPosition, $mValue);
279+
$result = $this->substr($this->currentPosition, $value);
280280
$iLineCount = \substr_count($result, "\n");
281281
$this->lineNumber += $iLineCount;
282-
$this->currentPosition += $mValue;
282+
$this->currentPosition += $value;
283283
return $result;
284284
}
285285
}

src/Rule/Rule.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ public function getValue()
177177
}
178178

179179
/**
180-
* @param RuleValueList|string|null $mValue
180+
* @param RuleValueList|string|null $value
181181
*/
182-
public function setValue($mValue): void
182+
public function setValue($value): void
183183
{
184-
$this->value = $mValue;
184+
$this->value = $value;
185185
}
186186

187187
/**

src/Value/CalcFunction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public static function parse(ParserState $parserState, bool $ignoreCase = false)
6060
continue;
6161
}
6262
if ($lastComponentType != CalcFunction::T_OPERAND) {
63-
$oVal = Value::parsePrimitiveValue($parserState);
64-
$calcRuleValueList->addListComponent($oVal);
63+
$value = Value::parsePrimitiveValue($parserState);
64+
$calcRuleValueList->addListComponent($value);
6565
$lastComponentType = CalcFunction::T_OPERAND;
6666
} else {
6767
if (\in_array($parserState->peek(), $operators, true)) {

0 commit comments

Comments
 (0)