\stdClass{foo?: string}
*/
function returnObject(): \stdClass {
$item2 = new \stdClass();
$item2->foo = "asd";
return $item2;
}
returnObject();
ERROR: InvalidDocblock - 19:1 - Unexpected brace character in docblock for returnObject
https://psalm.dev/r/74a2b6aaf5
https://psalm.dev/docs/annotating_code/type_syntax/object_types/#unnamed-objects
Обсуждают сегодня