.phpstorm.meta.php: Autocomplete method argument with object properties

Hi,

Using PHPStorm Meta, is there any way to get a method argument autocompleted with a list of object properties ?

For example, having this class:

class Foo
{
public $a;
public $b;
public $c;

public function doSomething($attr) {
// ...
}
}

$foo = new Foo();
$foo->doSomething('<caret>');

Is there a way to get "a", "b" and "c" suggested at caret?

Thank you.

1 comment
Comment actions Permalink

Basically, the "expected arguments" is the direction to look at:

https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html#expected-arguments

 

However, I am not sure if there is any way to pass class properties there.

0

Please sign in to leave a comment.