I have this basic code:
$test = array(
'nested' => array('test' => 'nada');
);
function doit()
{
global $test;
$test['nested'][''];
}
PHPStorm correctly suggests me 'nested' when I press Ctrl+Space
However, I found no way to make it suggest 'test' as member of the 'nested' array.
PHPStorm does not seem to be aware that nested is an array and also has members.
Is that a bug, did I do something wrong ?
According to comment I tried another solution to get completion support:
With no luck either
class test
{
public static $nested = array('test' => 'nada');
}
function doit()
{
$completeme = test::$nested;
$completeme['']; // no completion working
/** @var test::nested $completeme */
$completeme = test::$nested;
$completeme['']; // no completion working
}
Same issue for me at the IDE, this time it is an array inside a class.
test::nested[''] << this works, I get completion. But as soon as I make a copy of it I found no way to get completion again or to specify the type using phpdoc.