Skip to content

Commit 3e93824

Browse files
committed
Improve types for psalm
Signed-off-by: Fawzi E. Abdulfattah <[email protected]>
1 parent 2961130 commit 3e93824

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Statements/WithStatement.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,14 @@ public function parse(Parser $parser, TokensList $list)
240240

241241
// 5 is the only valid end state
242242
if ($state !== 5) {
243-
$parser->error('Unexpected end of WITH CTE.', $list->tokens[$list->idx]);
243+
/**
244+
* Token parsed at this moment.
245+
*
246+
* @var Token
247+
*/
248+
$token = $list->tokens[$list->idx];
249+
250+
$parser->error('Unexpected end of the WITH CTE.', $token);
244251
}
245252

246253
--$list->idx;

0 commit comments

Comments
 (0)