Detect imported variable's types from inside anonymous functions
addiks opened this issue · 0 comments
addiks commented
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
};
}
}