Open 1234ru opened 2 years ago
I have arrays of items, whose structure is declared, and I reference to that structure in the arrays' declaration.
If the array has implicit or numeric keys, suggestion works fine.
But if the array has string keys, suggestion doesn't work.
<?php class Test { /** @var = [ * 'one' => '', * 'two' => '', * ] */ public $x; } /** @var $a = [ Test::$x ] */ $a = [ [ '' // suggests 'one', 'two' as expected ] ]; /** @var $b = [ Test::$x ] */ $b = [ 'key' => [ '' // doesn't suggest anything :( ] ];
Is there a way to make such reference work in an associative array?
I have arrays of items, whose structure is declared, and I reference to that structure in the arrays' declaration.
If the array has implicit or numeric keys, suggestion works fine.
But if the array has string keys, suggestion doesn't work.
Is there a way to make such reference work in an associative array?