public static function getReturnType($param)
{
$lexer = new Lexer($param);
// A dummy parser is used for error reporting.
$type = DataType::parse(new Parser(), $lexer->list);
if ($type === null) {
return array('', '', '', '', '');
}
$options = array();
foreach ($type->options->options as $opt) {
$options[] = is_string($opt) ? $opt : $opt['value'];
}
return array('', '', $type->name, implode(',', $type->parameters), implode(' ', $options));
}