Skip to content

Commit d0bf1fa

Browse files
committed
chore: raise phpstan level
1 parent 308d81c commit d0bf1fa

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 2
2+
level: 3
33
paths:
44
- ./src
55
- ./test

src/AbstractToken.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ public function __construct(string $appSecret, protected string $tokenData, Sign
6464
protected function parseToken(): void
6565
{
6666
// parse text
67-
$this->token = $this->config->parser()->parse($this->tokenData);
67+
$token = $this->config->parser()->parse($this->tokenData);
68+
if (!$token instanceof Plain) {
69+
throw new \RuntimeException('Parsed token is not a Plain token');
70+
}
71+
$this->token = $token;
6872
}
6973

7074
/**

0 commit comments

Comments
 (0)