I use Laravel ORM in my php project and I use a lot of dynamic where in my code. E.g.
UserModel::whereName('Foo')->whereGender(1)->first();
When I use PhpStorm 2016.1 (I think) I can add PHPDoc string to class UserModel
to have the code completion with whereName
and the following whereGender
by doing the following:
/**
* class UserModel
* @method static $this whereName($val)
* @method static $this whereGender($val)
*/
class UserModel {
.......
}
But after I upgrade to the newest version of PhpStorm 2016.2.2. the second method whereGender
will not appear in the code completion list. On JetBrains website I found the 2016.2's new feature
static methods are filtered out from completion lists.
My question is: is there a way to make PhpStorm give the completion whereGender
after the whereName
call?
update:
Completion has to be invoked twice to get static methods. https://youtrack.jetbrains.com/issue/WI-9403#comment=27-1490430