Skip to content

Commit

Permalink
Update TokenStream.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy Quissens committed Nov 8, 2020
1 parent 2fd1a96 commit 03d6e7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/PhpParser/Internal/TokenStream.php
Expand Up @@ -64,7 +64,7 @@ public function haveTokenImmediatelyBefore(int $pos, $expectedTokenType) : bool
$tokens = $this->tokens;
$pos--;
for (; $pos >= 0; $pos--) {
$index = is_string($tokenType)?1:0;
$index = is_string($expectedTokenType)?1:0;
$tokenType = $tokens[$pos][0];
if ($tokenType === $expectedTokenType) {
return true;
Expand All @@ -91,7 +91,7 @@ public function haveTokenImmediatelyAfter(int $pos, $expectedTokenType) : bool {
$tokens = $this->tokens;
$pos++;
for (; $pos < \count($tokens); $pos++) {
$index = is_string($tokenType)?1:0;
$index = is_string($expectedTokenType)?1:0;
$tokenType = $tokens[$pos][0];
if ($tokenType === $expectedTokenType) {
return true;
Expand Down

0 comments on commit 03d6e7c

Please sign in to comment.