How to tell to the IDE what class is some var?

Hello, I'm trying to do something similar to the @var comment in PHPStorm for telling to the IDE what type is some var.
But I didn't have success with this, I was trying with PsiReferences but maybe that's not the right way (or I'm doing it wrong). And because the API for PHPStorm is not open I can't read what it's doing inside.

Could you please give me some hints of how to simulate the same behavior of @var comments (without adding them)?

Thanks !!

4 comments
Comment actions Permalink

Unfortunately there is no such ability ATM, but we plan to work on PHP openapi soon.

0
Comment actions Permalink

and is not possible to simulate that in any way? at least as a workaround? :(
I think I could use the completion contributos EP for example, but it would much more useful and nicer if I can just say: "hey, this object is an instance of this class, now do what you know".

0
Comment actions Permalink

Well we started to publishing APIs in 6.0. We'll provide extension points to achieve this and tutorials how to use them. Please stay tuned.

0
Comment actions Permalink

Those are great news Alexey thanks !!!

0

Please sign in to leave a comment.