Skip to content

Commit

Permalink
Add note to future self
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Nov 26, 2019
1 parent 9d32273 commit 2f02da6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Psalm/Internal/Visitor/ReflectorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,9 @@ private function registerClassLike(PhpParser\Node\Stmt\ClassLike $node)
$storage->is_trait = true;
$this->file_storage->has_trait = true;
$this->codebase->classlikes->addFullyQualifiedTraitName($fq_classlike_name, $this->file_path);

// adding this trait information (and scanning the traits in to begin with)
// increases the memory usage, but makes Psalm faster.
$this->codebase->classlikes->addTraitNode(
$fq_classlike_name,
$node,
Expand Down

0 comments on commit 2f02da6

Please sign in to comment.