Skip to content

Commit d8071d0

Browse files
committed
Fi result cache bug with imported type aliases in a trait
1 parent 657fc54 commit d8071d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Dependency/DependencyResolver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use PHPStan\Node\InClassMethodNode;
1717
use PHPStan\Node\InClassNode;
1818
use PHPStan\Node\InFunctionNode;
19+
use PHPStan\Node\InTraitNode;
1920
use PHPStan\Reflection\ClassReflection;
2021
use PHPStan\Reflection\FunctionReflection;
2122
use PHPStan\Reflection\ParameterReflectionWithPhpDocs;
@@ -45,7 +46,7 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
4546
{
4647
$dependenciesReflections = [];
4748

48-
if ($node instanceof InClassNode) {
49+
if ($node instanceof InClassNode || $node instanceof InTraitNode) {
4950
$docComment = $node->getDocComment();
5051
if ($docComment !== null) {
5152
$phpDoc = $this->fileTypeMapper->getResolvedPhpDoc(

0 commit comments

Comments
 (0)