No public method suggestions for class, in which I can jump by CTRL + LEFT MOUSE BUTTON

Answered

Dear PHPStorm support team,

I have a class with public methods. I can jump into the class from a different class by hitting CTRL + LEFT MOUSE BUTTON on the class name. If I try to get suggestions for public methods via writing

$this->myClass->

and hitting CTRL + SPACE then I see "no suggestions". What is the dependency here for getting PHP class method suggestions by the IDE?

I have recorded a screencast video, to enable you for a better understanding of my issue: https://drive.google.com/file/d/0B5vmNAcUsVUgUXlkTTB4dkF5WUE/view

I am using PhpStorm version 2016.2.

0
2 comments
Avatar
Permanently deleted user

OK, I have figured it out by myself. The instatiation of the class was not in the constructor, but in the setUp() method of the PHPUnit test. I have needed to set this class method field as a property and cast it via the following annotation: 

/** @var AccessCheck $accessCheck */
0

Thanks for sharing this.

0

Please sign in to leave a comment.