Reputation: 1545
Is it possible to display protected members in autocomplete list? For example:
class Foo
{
protected $bar;
public function __get($name) { return $this->$name; }
}
$foo = new Foo();
$foo-> // display autocomplete list with bar
I use PhpStorm 10
Upvotes: 0
Views: 244
Reputation: 165228
Use @property
in class-level PHPDoc comment.
https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#714-property
/**
* @property ProperTypeHere $bar [Optional description]
*/
class Foo
{
protected $bar;
public function __get($name) { return $this->$name; }
}
Upvotes: 2