In the further future, we should probably look at having getAllVariablesInFunction as well as getVariableType skip scopes that don't apply. For example:
$y = new Foo();
function foo()
{
$x = 5;
$y = new Bar();
$z = 3;
$callback = function () use ($z) {
// $x and $y should not be visible here, $z should be visible.
};
}
// I shouldn't see $x in autocompletion here as it is in another scope.
// $y should not resolve to an instance of Bar, but of Foo.
I think this is more of a low-priority ticket and something for the long-term roadmap.
Hello
In the further future, we should probably look at having
getAllVariablesInFunction
as well asgetVariableType
skip scopes that don't apply. For example:I think this is more of a low-priority ticket and something for the long-term roadmap.
Thanks in advance