Closed iluuu1994 closed 8 years ago
Local variables that are initialized with a newly allocated instance using its full namespace don't work for me.
$bar = new \Foo\Bar(); $bar->{???}
Any idea what's going on here? Adding a PHPDoc or using a use statement and then initializing using new Bar() fixes the issue.
use
new Bar()
/** @var \Foo\Bar */ $bar = new \Foo\Bar(); $bar->{all the stuff} // or use \Foo\Bar; $bar = new Bar(); $bar->{all the stuff}
The description of my issue is actually incorrect, this ONLY happens when the first character of the namespace is a lowercase character. I'll create a pull request shortly to fix this.
Local variables that are initialized with a newly allocated instance using its full namespace don't work for me.
Any idea what's going on here?
Adding a PHPDoc or using a
use
statement and then initializing usingnew Bar()
fixes the issue.