Skip to content

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

@addiks

Description

@addiks

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
        };
    }
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions