Completing the PhpStorm Static Method

I am using Laravel ORM in my php project and I am using a lot of dynamic ones where in my code. For instance.

UserModel::whereName('Foo')->whereGender(1)->first();

When I use PhpStorm 2016.1 (I think), I can add a PHPDoc line to the class UserModelto complete the code with whereNameand the following whereGenderby doing the following:

/**
* class UserModel
* @method static $this whereName($val)
* @method static $this whereGender($val)
*/
class UserModel {
 .......
}

But after I upgrade to the new version of PhpStorm 2016.2.2. the second method whereGenderwill not appear in the code completion list. On the JetBrains website I found a new feature 2016.2

static methods are filtered out of completion lists.

My question is: is there a way to get PhpStorm to complete completion whereGenderafter a call whereName?

update:

, . https://youtrack.jetbrains.com/issue/WI-9403#comment=27-1490430

+4
1

TL;DR:

, ->, CTRL + SPACE, . mac , :

Preferences->Keymap:
Main Menu->Code->Completion->Basic

, static/non-static , phpstorm , : https://blog.jetbrains.com/phpstorm/2016/07/completion-changes-in-phpstorm/

, , $this->. , . $this-> , PHP. , , PHPUnit .

, , phpdoc, phpstorm " ". ( CTRL + Space), . " ".

:

+2

Source: https://habr.com/ru/post/1659486/


All Articles