protected static function _generateReturnType($method)
{
if (Suite::$PHP < 7) {
return '';
}
$type = $method->getReturnType();
if ($type) {
if (!$type->isBuiltin()) {
$type = '\\' . $type;
}
if (defined('HHVM_VERSION')) {
$type = preg_replace('~\\\\?HH\\\\(mixed|void)?~', '', $type);
}
}
return $type ? ": {$type} " : '';
}