diff --git a/src/Psalm/Internal/Analyzer/ClassAnalyzer.php b/src/Psalm/Internal/Analyzer/ClassAnalyzer.php index b898578800d..848b392cf4c 100644 --- a/src/Psalm/Internal/Analyzer/ClassAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ClassAnalyzer.php @@ -509,12 +509,12 @@ public function analyze( IssueBuffer::maybeAdd( new ReservedWord( 'A class constant cannot be named \'class\'', - new CodeLocation($this, $this->class), + new CodeLocation($this, $const), $this->fq_class_name ) ); } - + $const_id = strtolower($this->fq_class_name) . '::' . $const->name; foreach ($codebase->class_constants_to_rename as $original_const_id => $new_const_name) {