mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix miscellaneous var ids
This commit is contained in:
parent
ab2b3cea9e
commit
a444fd95c2
@ -34,7 +34,7 @@ class CommentChecker
|
||||
// support PHPStorm-style docblocks like
|
||||
// @var Type $variable
|
||||
if (count($var_parts) > 1 && $var_parts[1][0] === '$') {
|
||||
$type_in_comments_var_id = substr($var_parts[1], 1);
|
||||
$type_in_comments_var_id = $var_parts[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4312,7 +4312,7 @@ class StatementsChecker
|
||||
$var = $stmt->args[0]->value;
|
||||
|
||||
if ($var instanceof PhpParser\Node\Expr\Variable && is_string($var->name)) {
|
||||
$stmt->inferredType = new Type\Union([new Type\T($var->name)]);
|
||||
$stmt->inferredType = new Type\Union([new Type\T('$' . $var->name)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user