Skip to content

Commit 932ff7e

Browse files
committed
chore: fix sa
1 parent 0042163 commit 932ff7e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Parser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ private function parseInfix(NodeInterface $left): NodeInterface
182182
TokenType::Plus, TokenType::Minus, TokenType::Multiply, TokenType::Star, TokenType::Divide, TokenType::Modulo, TokenType::Div =>
183183
new Arithmetic($left, ArithmethicType::fromTokenType($current->type), $this->parseExpression($current->bindingPower())),
184184
TokenType::Lbracket => $this->parseBracketExpression($left),
185-
186-
default => throw new \Exception("Unhandled infix: {$current->type->name}, $left")
185+
default => throw new \Exception("Unexpected infix token: {$current->type->name}")
187186
};
188187
}
189188

src/TokenStream.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public function advance(): Token
3434
return $result;
3535
}
3636

37+
/**
38+
* @phpstan-impure
39+
*/
3740
public function match(TokenType ...$types): bool
3841
{
3942
if (in_array($this->current()->type, $types, true)) {

tests/LexerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace JmesPathCommunity\Tests;
44

55
use JmesPathCommunity\Lexer;
6-
use PHPUnit\Framework\Attributes\CoversClass;
76
use PHPUnit\Framework\Attributes\DataProvider;
87
use PHPUnit\Framework\TestCase;
98

tests/ParserTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use JmesPathCommunity\Context;
88
use JmesPathCommunity\Parser;
9-
use PHPUnit\Framework\Attributes\CoversClass;
109
use PHPUnit\Framework\Attributes\DataProvider;
1110
use PHPUnit\Framework\TestCase;
1211

0 commit comments

Comments
 (0)