Skip to content

Commit

Permalink
Fi result cache bug with imported type aliases in a trait
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jul 13, 2023
1 parent 657fc54 commit d8071d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Dependency/DependencyResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use PHPStan\Node\InClassMethodNode;
use PHPStan\Node\InClassNode;
use PHPStan\Node\InFunctionNode;
use PHPStan\Node\InTraitNode;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
Expand Down Expand Up @@ -45,7 +46,7 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
{
$dependenciesReflections = [];

if ($node instanceof InClassNode) {
if ($node instanceof InClassNode || $node instanceof InTraitNode) {
$docComment = $node->getDocComment();
if ($docComment !== null) {
$phpDoc = $this->fileTypeMapper->getResolvedPhpDoc(
Expand Down

0 comments on commit d8071d0

Please sign in to comment.