1
0
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:
Matthew Brown 2016-10-13 19:01:12 -04:00
parent ab2b3cea9e
commit a444fd95c2
2 changed files with 2 additions and 2 deletions

View File

@ -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];
}
}
}

View File

@ -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)]);
}
}
}