From 0c86ed7622892dd1f93dae56ed8227c48cae1acf Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sat, 8 Mar 2025 12:30:13 +0100 Subject: [PATCH] [CLEANUP] Avoid Hungarian notation for `numberOfLines` Part of #756 --- src/Parsing/ParserState.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 484006ceb..b6ede7af8 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -259,7 +259,7 @@ public function peek($length = 1, $offset = 0): string public function consume($value = 1): string { if (\is_string($value)) { - $iLineCount = \substr_count($value, "\n"); + $numberOfLines = \substr_count($value, "\n"); $length = $this->strlen($value); if (!$this->streql($this->substr($this->currentPosition, $length), $value)) { throw new UnexpectedTokenException( @@ -269,7 +269,7 @@ public function consume($value = 1): string $this->lineNumber ); } - $this->lineNumber += $iLineCount; + $this->lineNumber += $numberOfLines; $this->currentPosition += $this->strlen($value); return $value; } else { @@ -277,8 +277,8 @@ public function consume($value = 1): string throw new UnexpectedEOFException((string) $value, $this->peek(5), 'count', $this->lineNumber); } $result = $this->substr($this->currentPosition, $value); - $iLineCount = \substr_count($result, "\n"); - $this->lineNumber += $iLineCount; + $numberOfLines = \substr_count($result, "\n"); + $this->lineNumber += $numberOfLines; $this->currentPosition += $value; return $result; }