I want to define object shape for autocompletion in PhpStorm.
for example:
$myobject = json_decode("{id:1, price:123.99}");
for arrays exists docblock:
/**
* @var array{id: int, price: float}
*/
$myArray = json_decode($jsonString, true);
and when I type:
$myArray['']
IDE autocompletes it to id
| price
I want to do it in a similar way for objects:
/**
* @var object|stdClass{id: int, price: float}
*/
$myObject = json_decode($jsonString, false);
and get autocomplete when I type
$myObject->