/** * Maps a method * * @param php.ReflectionMethod $reflect * @return [:var] */ protected function method($reflect) { $method = parent::method($reflect); if ($type = $reflect->getReturnType()) { $method['returns'] = $this->mapReflectionType($reflect, (string) $type); } return $method; }
/** * Maps a method * * @param php.ReflectionMethod $reflect * @return [:var] */ protected function method($reflect) { $method = parent::method($reflect); if ($type = $reflect->getReturnTypeText()) { $method['returns'] = function () use($type) { return $this->types->map($type); }; } return $method; }