Skip to content

Commit c227620

Browse files
authored
[CLEANUP] Avoid Hungarian notation for numberOfLines (#1112)
Part of #756
1 parent 150007c commit c227620

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Parsing/ParserState.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public function peek($length = 1, $offset = 0): string
259259
public function consume($value = 1): string
260260
{
261261
if (\is_string($value)) {
262-
$iLineCount = \substr_count($value, "\n");
262+
$numberOfLines = \substr_count($value, "\n");
263263
$length = $this->strlen($value);
264264
if (!$this->streql($this->substr($this->currentPosition, $length), $value)) {
265265
throw new UnexpectedTokenException(
@@ -269,16 +269,16 @@ public function consume($value = 1): string
269269
$this->lineNumber
270270
);
271271
}
272-
$this->lineNumber += $iLineCount;
272+
$this->lineNumber += $numberOfLines;
273273
$this->currentPosition += $this->strlen($value);
274274
return $value;
275275
} else {
276276
if ($this->currentPosition + $value > \count($this->characters)) {
277277
throw new UnexpectedEOFException((string) $value, $this->peek(5), 'count', $this->lineNumber);
278278
}
279279
$result = $this->substr($this->currentPosition, $value);
280-
$iLineCount = \substr_count($result, "\n");
281-
$this->lineNumber += $iLineCount;
280+
$numberOfLines = \substr_count($result, "\n");
281+
$this->lineNumber += $numberOfLines;
282282
$this->currentPosition += $value;
283283
return $result;
284284
}

0 commit comments

Comments
 (0)