-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
@var above use statement works correctly only when the referenced class matches the one imported in use. Is it possible to read all use statements to get the right class name? BTW, PhpStorm supports this correctly.
Code snippet that reproduces the problem
<?php
/**
* @var ClassName2 $two
* @var ClassName1 $one
*/
use \Some\Namespaced\ClassName1;
use \Some\Namespaced\ClassName2;
\PHPStan\dumpType($one); // yields Some\Namespaced\ClassName1 – perfect
\PHPStan\dumpType($two); // yields ClassName2 (not a FQCN, error)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels