Jean-FrancoisHIVERT thank you for reminding me.
Yes, currently the editor respects a doc block above the statement.
In the sample above, @var ArrayObject $data has no effect, because it does not correspond to the code below it, and then the line $data = $a->{'data'}; "overwrites" this information. The following would work:
/** @var ArrayObject $array */
$array = $a->data;
$array->getArrayCopy();
/** @var ArrayObject $data */
$data = $a->{'data'};
$data->getArrayCopy();
But you are right, we should remember the type from the doc block, and respect it - I'm adding it to the list.