Skip to content

Commit

Permalink
Always check unused methods and properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-worman committed Dec 22, 2022
1 parent 390da64 commit 9add80a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Psalm/Internal/Codebase/ClassLikes.php
Expand Up @@ -860,10 +860,9 @@ public function consolidateAnalyzedData(Methods $methods, ?Progress $progress, b
),
$classlike_storage->suppressed_issues,
);
} else {
$this->checkMethodReferences($classlike_storage, $methods);
$this->checkPropertyReferences($classlike_storage);
}
$this->checkMethodReferences($classlike_storage, $methods);
$this->checkPropertyReferences($classlike_storage);
}

$this->findPossibleMethodParamTypes($classlike_storage);
Expand Down
2 changes: 1 addition & 1 deletion tests/UnusedCodeTest.php
Expand Up @@ -160,7 +160,7 @@ function bar(): void{
$this->analyzeFile($file_path, new Context(), false);
$this->project_analyzer->consolidateAnalyzedData();

$this->assertSame(3, IssueBuffer::getErrorCount());
$this->assertSame(4, IssueBuffer::getErrorCount());
$issue = IssueBuffer::getIssuesDataForFile($file_path)[2];
$this->assertSame('UnusedClass', $issue->type);
$this->assertSame(10, $issue->line_from);
Expand Down

0 comments on commit 9add80a

Please sign in to comment.