How to get the class for some $var (PhpStorm)
Hi ! I need to get the class name for some PsiElement (Variable).
I was trying something like.
PhpType phpType = variable.getType();
String signature = phpType.toString();
PhpIndex index = PhpIndex.getInstance(currentElement.getProject());
Collection<PhpNamedElement> classes = index.getBySignature(signature);
But "classes" is always returning 0 elements, could somebody help me with this?
Thanks !!
Please sign in to leave a comment.
use index.getClassesByFQN()
It doesn't work either. Inside "signature" I have something like: #ÑMODEL.sales/quote|?
Enrique, you got my Skype - feel free to discuss openapi problems there.
This is so way off any context.