From 4c1cf37d5228cff3af883ceae32855d1a577ec63 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Fri, 13 Nov 2020 12:36:17 -0500 Subject: [PATCH] Improve error message for UnusedVariable --- src/Psalm/Internal/Analyzer/StatementsAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php index d70098c01..12b7c1a9c 100644 --- a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php @@ -736,7 +736,7 @@ class StatementsAnalyzer extends SourceAnalyzer && !$this->data_flow_graph->isVariableUsed($assignment_node) ) { $issue = new UnusedVariable( - 'Variable ' . $var_id . ' is never referenced', + $var_id . ' is never referenced or the value is not used', $original_location );