From 02d357af06be27dba50940bbe8dff6041e5aa57e Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sun, 9 Mar 2025 09:42:33 +0100 Subject: [PATCH] [CLEANUP] Improve some variable names in `ParserState` --- src/Parsing/ParserState.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 37b663763..ca18bd4d9 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -349,27 +349,27 @@ public function consumeUntil( array &$comments = [] ): string { $stopCharacters = \is_array($stopCharacters) ? $stopCharacters : [$stopCharacters]; - $out = ''; + $consumedCharacters = ''; $start = $this->currentPosition; while (!$this->isEnd()) { - $char = $this->consume(1); - if (\in_array($char, $stopCharacters, true)) { + $character = $this->consume(1); + if (\in_array($character, $stopCharacters, true)) { if ($bIncludeEnd) { - $out .= $char; + $consumedCharacters .= $character; } elseif (!$consumeEnd) { - $this->currentPosition -= $this->strlen($char); + $this->currentPosition -= $this->strlen($character); } - return $out; + return $consumedCharacters; } - $out .= $char; + $consumedCharacters .= $character; if ($comment = $this->consumeComment()) { $comments[] = $comment; } } if (\in_array(self::EOF, $stopCharacters, true)) { - return $out; + return $consumedCharacters; } $this->currentPosition = $start;