I have a list of objects which I retrieve in the following way:
list($var1, $var2, $var3) = $helper->getStuff();
except longer.
Now, all of these variables are of the same class, Foo, and I want to annotate them so that the IDE (PHPStorm) realizes what I'm doing.
Normally, getting one variable at a time, I would go
/**@var Foo $var1 */
$var1 = ...;
/**@var Foo $var2 */
$var2 = ...;
etc. But how can I accomplish this, with the list($var1, $var2, $var3) = ...; way of getting them?
Ideally, it would be something like
/**@var Foo $var1, $var2, $var3 */
so that I could consolidate them into one line. And yes, I've tried that, both comma-separated and space-separated.
$helper->getStuff()has proper@returntag annotation). If not -- then it might get improved in 2016.3 versiongetStuff()function is annotated with@return Foo[]but it doesn't carry over.Foo[])