Skip to content
Permalink
Browse files

Fix #2506 - use correct flag when checking classes after analysis

  • Loading branch information
muglug committed Dec 24, 2019
1 parent ee35db5 commit 6b81f8c64a114b978cb438c34971cb87a7c6ed93
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Psalm/Internal/Analyzer/ProjectAnalyzer.php
  2. +2 −2 src/Psalm/Internal/Codebase/ClassLikes.php
@@ -542,7 +542,7 @@ public function consolidateAnalyzedData()
$this->codebase->classlikes->consolidateAnalyzedData(
$this->codebase->methods,
$this->progress,
$this->codebase->collect_references
!!$this->codebase->find_unused_code
);
}

@@ -727,7 +727,7 @@ public function getUnAliasedName(string $alias_name)
/**
* @return void
*/
public function consolidateAnalyzedData(Methods $methods, ?Progress $progress, bool $check_references)
public function consolidateAnalyzedData(Methods $methods, ?Progress $progress, bool $find_unused_code)
{
if ($progress === null) {
$progress = new VoidProgress();
@@ -746,7 +746,7 @@ public function consolidateAnalyzedData(Methods $methods, ?Progress $progress, b
&& $this->config->isInProjectDirs($classlike_storage->location->file_path)
&& !$classlike_storage->is_trait
) {
if ($check_references) {
if ($find_unused_code) {
if (!$this->file_reference_provider->isClassReferenced($fq_class_name_lc)) {
if (IssueBuffer::accepts(
new UnusedClass(

0 comments on commit 6b81f8c

Please sign in to comment.
You can’t perform that action at this time.