Skip to content

Commit

Permalink
Merge pull request #10434 from nicelocal/fix_virtual
Browse files Browse the repository at this point in the history
Use correct file path while adding unused suppressions for virtual __…
  • Loading branch information
orklah committed Dec 2, 2023
2 parents 8a180e6 + 461cd18 commit fe34213
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@ public function analyze(
|| !in_array("UnusedPsalmSuppress", $storage->suppressed_issues)
) {
foreach ($storage->suppressed_issues as $offset => $issue_name) {
IssueBuffer::addUnusedSuppression($this->getFilePath(), $offset, $issue_name);
IssueBuffer::addUnusedSuppression(
$storage->location !== null
? $storage->location->file_path
: $this->getFilePath(),
$offset,
$issue_name,
);
}
}
}
Expand Down

0 comments on commit fe34213

Please sign in to comment.