diff --git a/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php b/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php index 359389ee9..cf2f73533 100644 --- a/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php @@ -152,7 +152,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer implements Statements $classlike_storage_provider = $codebase->classlike_storage_provider; - if ($codebase->track_unused_suppressions) { + if ($codebase->track_unused_suppressions && !isset($storage->suppressed_issues[0])) { foreach ($storage->suppressed_issues as $offset => $issue_name) { IssueBuffer::addUnusedSuppression($this->getFilePath(), $offset, $issue_name); } diff --git a/src/Psalm/Internal/Visitor/PartialParserVisitor.php b/src/Psalm/Internal/Visitor/PartialParserVisitor.php index 5dd4e5daf..e097dec68 100644 --- a/src/Psalm/Internal/Visitor/PartialParserVisitor.php +++ b/src/Psalm/Internal/Visitor/PartialParserVisitor.php @@ -309,7 +309,6 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract implements PhpP } if ($end_offset !== 0) { - /** @psalm-suppress MixedOperand */ $node->setAttribute('endFilePos', $stmt_end_pos + $end_offset); }