I have been looking for this for a while, and either I am not using the correct search terms or something is missing.
I am trying to figure out if PHPdoc can be used to determine the variables returned by an object.
Let's 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’s easy enough to determine the input parameters.
class SomeClass { public function staffDetails($id){ $object = new stdClass(); $object->type = "person"; $object->name = "dave"; $object->age = "46"; return $object; } }
The question is whether there is a similar thing to determine the output variables of the object returned by the method in question, so that another programmer does not have to open this class and manually look into the method to see that the returned object is returned
someuser
source share