From 1263a2e9a3bf010daf03ad57a2e649c585e7268e Mon Sep 17 00:00:00 2001 From: Brown Date: Wed, 27 Feb 2019 14:17:11 -0500 Subject: [PATCH] Fix missing param location --- src/Psalm/Internal/Visitor/ReflectorVisitor.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Visitor/ReflectorVisitor.php b/src/Psalm/Internal/Visitor/ReflectorVisitor.php index 7ea263583..f88b31f42 100644 --- a/src/Psalm/Internal/Visitor/ReflectorVisitor.php +++ b/src/Psalm/Internal/Visitor/ReflectorVisitor.php @@ -2280,7 +2280,17 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse $code_location->setCommentLine($docblock_param['line_number']); if ($storage_param === null) { - $unused_docblock_params[$param_name] = $code_location; + $param_location = new CodeLocation( + $this->file_scanner, + $function, + null, + true, + CodeLocation::FUNCTION_PARAM_VAR, + $docblock_param['type'] + ); + + $param_location->setCommentLine($docblock_param['line_number']); + $unused_docblock_params[$param_name] = $param_location; if (!$docblock_param_variadic || $storage->params || $this->scan_deep) { continue;