PHPDocBlock[] docBlocks = new PHPDocBlock[0];
try {
IModelElement element = methodContext.getSourceModule()
.getElementAt(methodDeclaration.getNameStart());
if (element instanceof IMethod) {
IMethod method = (IMethod) element;
if (method.getDeclaringType() != null) {
docBlocks = PHPModelUtils
.getTypeHierarchyMethodDoc(
method.getDeclaringType(),
methodContext.getCache() != null ? methodContext
.getCache()
.getSuperTypeHierarchy(
method.getDeclaringType(),
null)
: null, method
.getElementName(), true,
null);
} else {
docBlocks = new PHPDocBlock[] { methodDeclaration
.getPHPDoc() };