String type = null;
try {
PHPModuleDeclaration module = (PHPModuleDeclaration) SourceParserUtil.parse(field.getSourceModule(), null);
FieldReferenceParser typeParser = new FieldReferenceParser(field);
module.traverse(typeParser);
if (typeParser.getReference() != null) {
SimpleReference ref = typeParser.getReference();
type = ref.getName();