Skip to content

Commit 02d357a

Browse files
committed
[CLEANUP] Improve some variable names in ParserState
1 parent 1de81af commit 02d357a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Parsing/ParserState.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -349,27 +349,27 @@ public function consumeUntil(
349349
array &$comments = []
350350
): string {
351351
$stopCharacters = \is_array($stopCharacters) ? $stopCharacters : [$stopCharacters];
352-
$out = '';
352+
$consumedCharacters = '';
353353
$start = $this->currentPosition;
354354

355355
while (!$this->isEnd()) {
356-
$char = $this->consume(1);
357-
if (\in_array($char, $stopCharacters, true)) {
356+
$character = $this->consume(1);
357+
if (\in_array($character, $stopCharacters, true)) {
358358
if ($bIncludeEnd) {
359-
$out .= $char;
359+
$consumedCharacters .= $character;
360360
} elseif (!$consumeEnd) {
361-
$this->currentPosition -= $this->strlen($char);
361+
$this->currentPosition -= $this->strlen($character);
362362
}
363-
return $out;
363+
return $consumedCharacters;
364364
}
365-
$out .= $char;
365+
$consumedCharacters .= $character;
366366
if ($comment = $this->consumeComment()) {
367367
$comments[] = $comment;
368368
}
369369
}
370370

371371
if (\in_array(self::EOF, $stopCharacters, true)) {
372-
return $out;
372+
return $consumedCharacters;
373373
}
374374

375375
$this->currentPosition = $start;

0 commit comments

Comments
 (0)