Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jul 25, 2023
1 parent 964080e commit e402813
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Psalm/Internal/Codebase/ClassLikes.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,12 @@ public function hasFullyQualifiedTraitName(string $fq_class_name, ?CodeLocation
{
$fq_class_name_lc = strtolower($this->getUnAliasedName($fq_class_name));

if (isset($this->existing_enums_lc[$fq_class_name_lc])) {
return $this->existing_enums_lc[$fq_class_name_lc];
if (isset($this->existing_traits_lc[$fq_class_name_lc])) {
return $this->existing_traits_lc[$fq_class_name_lc];
} elseif (!$this->classlike_storage_provider->has($fq_class_name_lc)
|| !$this->classlike_storage_provider->get($fq_class_name_lc)->is_trait
) {
return $this->existing_enums_lc[$fq_class_name_lc] = false;
return $this->existing_traits_lc[$fq_class_name_lc] = false;
}

if ($this->collect_references && $code_location) {
Expand All @@ -503,7 +503,7 @@ public function hasFullyQualifiedTraitName(string $fq_class_name, ?CodeLocation
);
}

return true;
return $this->existing_traits_lc[$fq_class_name_lc] = true;
}

/**
Expand Down

0 comments on commit e402813

Please sign in to comment.