@@ -49,21 +49,21 @@ abstract class AbstractLexer
49
49
/**
50
50
* The next token in the input.
51
51
*
52
- * @var mixed[]|null
53
- * @psalm-var Token<T, V>|null
52
+ * @var Token<T, V>|null
54
53
*/
55
54
public Token |null $ lookahead ;
56
55
57
56
/**
58
57
* The last matched/seen token.
59
58
*
60
- * @var mixed[]|null
61
- * @psalm-var Token<T, V>|null
59
+ * @var Token<T, V>|null
62
60
*/
63
61
public Token |null $ token ;
64
62
65
63
/**
66
64
* Composed regex for input parsing.
65
+ *
66
+ * @var non-empty-string|null
67
67
*/
68
68
private string |null $ regex = null ;
69
69
@@ -204,8 +204,7 @@ public function isA(string $value, int|string|UnitEnum $token)
204
204
/**
205
205
* Moves the lookahead token forward.
206
206
*
207
- * @return mixed[]|null The next token or NULL if there are no more tokens ahead.
208
- * @psalm-return Token<T, V>|null
207
+ * @return Token<T, V>|null The next token or NULL if there are no more tokens ahead.
209
208
*/
210
209
public function peek ()
211
210
{
@@ -219,8 +218,7 @@ public function peek()
219
218
/**
220
219
* Peeks at the next token, returns it and immediately resets the peek.
221
220
*
222
- * @return mixed[]|null The next token or NULL if there are no more tokens ahead.
223
- * @psalm-return Token<T, V>|null
221
+ * @return Token<T, V>|null The next token or NULL if there are no more tokens ahead.
224
222
*
225
223
* @phpstan-impure
226
224
*/
0 commit comments