suggestion for arrays

hi!

I have another question about suggestions.

This works fine.

/** @var $foo Bar */
$foo= new Bar();


But not this?

/** @var $foo['bla'] Bar */
$foo['bla'] = new Bar();

1 comment
Comment actions Permalink

Hi there,

Yes, you cannot do that (specify array key in PHPDoc hint) -- it works on first level variables ONLY (so /** @var $foo->boom Bar */ will not work as well)..

0

Please sign in to leave a comment.