From 504abaea2ab5e4dc28230f04fcf016cf14281440 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Thu, 20 Feb 2025 09:36:20 +0100 Subject: [PATCH] [CLEANUP] Avoid Hungarian notation for `offset` Part of #756 --- src/Parsing/ParserState.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 5663e2215..d6cc8fba1 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -252,15 +252,15 @@ public function comes($sString, $bCaseInsensitive = false): bool /** * @param int $length - * @param int $iOffset + * @param int $offset */ - public function peek($length = 1, $iOffset = 0): string + public function peek($length = 1, $offset = 0): string { - $iOffset += $this->currentPosition; - if ($iOffset >= $this->length) { + $offset += $this->currentPosition; + if ($offset >= $this->length) { return ''; } - return $this->substr($iOffset, $length); + return $this->substr($offset, $length); } /** @@ -498,16 +498,16 @@ private function strsplit($sString) /** * @param string $sString * @param string $sNeedle - * @param int $iOffset + * @param int $offset * * @return int|false */ - private function strpos($sString, $sNeedle, $iOffset) + private function strpos($sString, $sNeedle, $offset) { if ($this->parserSettings->bMultibyteSupport) { - return \mb_strpos($sString, $sNeedle, $iOffset, $this->charset); + return \mb_strpos($sString, $sNeedle, $offset, $this->charset); } else { - return \strpos($sString, $sNeedle, $iOffset); + return \strpos($sString, $sNeedle, $offset); } } }