What docblock definition on this function will satisfy PHPLint? /**
 * Implements hook_field_validate().
 *
 * @param string $entity_type
 * @param object $entity
 * @param array $field
 * @param array $instance
 * @param array $langcode
 * @param array $items
 * @param array $errors
 *
 * @return void
 */
function field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &amp;$errors) {
  foreach ($items as $delta =&gt; $item) {
    if (!empty($item['active'])) { /* ... */ }
  }
}


The code above works well enough, but I would like to apply some static analysis on it. Enter phplint, which doesn't like the $item['active'] check. It says:


  Warning: can't check usage of `[' applied to a value of type mixed.


The warning makes sense, if I don't declare more details about my array, PHPLint won't know if the []'s are applicable. My problem comes up when I read the array documentation for PHPLint. I don't understand how I'm supposed to change the doc-block to properly describe the array.

Array structure with example data:

0 =&gt; array('active' =&gt; 1)
1 =&gt; array('active' =&gt; 0)
2 =&gt; array('active' =&gt; 1)
3 =&gt; array('active' =&gt; 0)
Ok, did not noticed that, then:

@param int[int][string] $items

foreach($items as $k => $e){...}

here $k is int, $e is int[string].

In the general case, if

@param T[I1][I2][I3] $items

then

foreach($items as $k => $e){...}

yields $k of type I1 and $e of type T[I2][I3].