-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels