Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Detect imported variable's types from inside anonymous functions #7

Open
addiks opened this issue Jan 18, 2018 · 0 comments
Open

Detect imported variable's types from inside anonymous functions #7

addiks opened this issue Jan 18, 2018 · 0 comments

Comments

@addiks
Copy link
Owner

addiks commented Jan 18, 2018

At the moment the plugin cannot detect the type of a variable inside an anonymous function if it was declared outside the anonymous function and then imported in the "use" part of the function.

Code to reproduce:

<?php

use DateTime;

class TypesInClosures
{
    public function foo()
    {
        $foo = new DateTime();

        $foo-> # <= Autocomplete works here

        $bar = function () use ($foo) {
           $foo-> # <= Autocomplete does NOT work here, but it should
        };
    }
}
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant