autocomplete-php icon indicating copy to clipboard operation
autocomplete-php copied to clipboard

Suggestions for wrong type

Open Dgame opened this issue 10 years ago • 1 comments

class Bar {
    /**
    * @var string
    */
    public $var_abc = null;
    /**
    * @var string
    */
    public $var_xyz = null;
    /**
    * @var string
    */
    public $var_foo = null;

    public function foourz() { }
}

class Foo {
    /**
    * @param $a bool
    */
    public function foobar($a) {
        return new Bar();
    }

    /**
    *
    */
    public function test() {

    }
}

$f = new Foo();
$f->foo

I got suggestions for foobar and foourz although $f is of type Foo and has no method foourz. Is it possible to solve that? If you may say what is needed, I would try.

Dgame avatar Aug 03 '15 10:08 Dgame

@Azakur4 It would be helpful if at least the type/class of the function would be there. I could help you if you want.

You could use my PHP-Parser to extract the properties and methods.

Dgame avatar Aug 05 '15 16:08 Dgame