Vscode-intelephense: Cant go-to function definition!

Created on 12 Feb 2018  路  3Comments  路  Source: bmewburn/vscode-intelephense

For example here , I cant go-to hello function definition:

use vendor\Foo;
class Bar{

    private $var;

    public function __construct(Foo $var) {
        $this->var = $var;
    }
    public function print(){
        $text = $this->var->hello();
    }
}
class Foo{
    public function hello(){
        return 'hello';
    }
}

Most helpful comment

thank you, and I hope this getting added in the future ..

All 3 comments

You need to phpdoc your property for now. The extension is not smart enough to infer this from the assignment in the constructor.

/** @var Foo */

thank you, and I hope this getting added in the future ..

tracking in bmewburn/intelephense#47

Was this page helpful?
0 / 5 - 0 ratings

Related issues

umpirsky picture umpirsky  路  4Comments

ottopic picture ottopic  路  3Comments

9brada6 picture 9brada6  路  3Comments

nn-hh picture nn-hh  路  3Comments

swashata picture swashata  路  3Comments