Page MenuHomePhabricator

Use information from assert_instances_of() in generated documentation
Open, LowPublic

Description

We can use calls of assert_instances_of() in the generated documentation. So instead of array $hunks we can print ArcanistDiffHunk[] $hunks.

NOTE: assert_instances_of() can be used also for non-parameters (and it really is).

It will be hard to avoid false positives in code like:

function f(array $a) {
  $a = array(new stdClass);
  assert_instances_of($a, 'stdClass');
}

But it's not worth the effort to deal with such code.