We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, in this case $data is always defined but a PossiblyUndefinedVariable error is triggered.
$data
PossiblyUndefinedVariable
https://psalm.dev/r/6fda415fad
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class A { public function __construct(int $a) { try { switch($a){ case 1: $data = "one"; break; default: throw new RuntimeException("not one"); } } catch(Throwable $e) { $data = $e->getMessage(); } echo $data; } } new A(2);
Psalm output (using commit 6d4d166): INFO: PossiblyUndefinedVariable - 17:14 - Possibly undefined variable $data defined in try block
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi, in this case
$data
is always defined but aPossiblyUndefinedVariable
error is triggered.https://psalm.dev/r/6fda415fad
The text was updated successfully, but these errors were encountered: