Skip to content

Commit

Permalink
Improve types for psalm
Browse files Browse the repository at this point in the history
Signed-off-by: Fawzi E. Abdulfattah <[email protected]>
  • Loading branch information
iifawzi committed Dec 6, 2021
1 parent 2961130 commit 3e93824
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Statements/WithStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,14 @@ public function parse(Parser $parser, TokensList $list)

// 5 is the only valid end state
if ($state !== 5) {
$parser->error('Unexpected end of WITH CTE.', $list->tokens[$list->idx]);
/**
* Token parsed at this moment.
*
* @var Token
*/
$token = $list->tokens[$list->idx];

$parser->error('Unexpected end of the WITH CTE.', $token);
}

--$list->idx;
Expand Down

0 comments on commit 3e93824

Please sign in to comment.