Say I have a function like this:
function theFunction() {
$arr = array();
for ($i=0;$i<10;$i++) {
$arr[] = new theObject($i);
}
return $arr;
}
I need to document the return type of the function. I could of course just usearray
, but that does not provide all the information that can be provided, and doesn't tell the developer much about the true nature of the function.
How do I document the type "array of [type]" in PHPDoc?
@var ObjectType[]
? – Luigiluigino