我有一个生成SomeObject[]
数组的方法。
/**
* @return SomeObject[]
*/
private function thatMethod()
{
...
return [$someObject, $someOtherObject, $yetAnotherObject]
}
然而当我通过list
读取对象时
list($someObject, $someOtherObject, $yetAnotherObject) = $this->thatMethod();
我丢失了这些对象的typehint。我必须通过@var SomeObject $someObject
明确地提示它们。我宁愿不这样做。
在PhpStorm9中使用list
时,是否有方法获得类型提示?
PhpStorm目前还不能这样做。
有一张票要照看。标记/投票/评论以获得进度通知