Is there a correct way to document values/objects in arrays which are within another dimension?
Normally an array will be handled like this:
/** @var ClassName[] $Array */
$Array = array( $InstanceOfClassName,.. )
But i need something like this:
/** @var ClassName[][] $Array */
$Array = array( 0 => array( $InstanceOfClassName,.. ) )
This is obviously not working, so what is the correct PHPDoc notation?
PhpStorm allows to typehint nested arrays with double brackets [][]:
/** @var \SplFileInfo[][] $doubleNestedArray */
$doubleNestedArray = [[]];
$doubleNestedArray[0][1]->getFileInfo(); // ->getFileInfo() is suggested by IDE