Scan whole project for methods

I have recently switched from netbeans to phpstorm. I'm working on quite a big codeigniter project and what I liked in netbeans very much is that it has a very smart algorithm for finding methods and functions in the whole project. Let me explain what I mean. When you have a model called "some_model" for example, and it has a method called "do_something", if you type this somewhere in your controller:


netbeans knows where to find the "do_something" method. So if, for example, you do cmd + left click it will automatically jump to the file where this method is defined. Or if this method has any comments attached, netbeans will show it in a popup when you mouse over the method. I'm a bit disapointed that phpstorm is't that smart in this case. It can neither jump to the source file, nor show any related comments.

Is there any solution available for better CI support in phpstorm?

1 comment
Comment actions Permalink

It's a huge problem with PhpStorm.

They say you can get around it using the @property line in class comment, however I've still run into a lot of headaches with that. At least try that method first.

A simple hack that works for me is this:
if(0) {
$this->some_model = new SomeModel();

PhpStorm will treat as though this class property has been defined. I usually add that to the constructor.
It's a pain in the arrse, but at least it saves some frustration.
Remember, try to use proper stuff first, eg. @property
Hope that helps future searches.
- Chris


Please sign in to leave a comment.