Skip to content

Commit

Permalink
fix @psalm-scope-this not working with FQCN with leading backslash
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Dec 30, 2022
1 parent 6353143 commit a1bcf66
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Psalm/Internal/Analyzer/StatementsAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ private function parseStatementDocblock(

if (isset($comments->tags['psalm-scope-this'])) {
$trimmed = trim(reset($comments->tags['psalm-scope-this']));
$trimmed = ltrim( $trimmed, '\\' );

if (!$codebase->classExists($trimmed)) {
IssueBuffer::maybeAdd(
Expand Down

0 comments on commit a1bcf66

Please sign in to comment.