PHPdoc - defining object properties for an object of stdClass
问题 I am trying to figure out if it is possible to use PHPdoc to define the object properties being returned by a function or a object method. Say I have the following class: class SomeClass { public function staffDetails($id){ $object = new stdClass(); $object->type = "person"; $object->name = "dave"; $object->age = "46"; return $object; } } Now, it is easy enough to define input parameters. /** * Get Staff Member Details * * @param string $id staff id number * * @return object */ class