protected function buildMethodDocumentation($className, $methodName)
{
$methodDocumentation = " /**\n * Autogenerated Proxy Method\n";
if ($this->reflectionService->hasMethod($className, $methodName)) {
$methodTags = $this->reflectionService->getMethodTagsValues($className, $methodName);
$allowedTags = ['param', 'return', 'throws'];
foreach ($methodTags as $tag => $values) {
if (in_array($tag, $allowedTags)) {
if (count($values) === 0) {
$methodDocumentation .= ' * @' . $tag . "\n";
} else {
foreach ($values as $value) {
$methodDocumentation .= ' * @' . $tag . ' ' . $value . "\n";
}
}
}
}
$methodAnnotations = $this->reflectionService->getMethodAnnotations($className, $methodName);
foreach ($methodAnnotations as $annotation) {
$methodDocumentation .= ' * ' . Compiler::renderAnnotation($annotation) . "\n";
}
}
$methodDocumentation .= " */\n";
return $methodDocumentation;
}