- fprintf($out, "%s) {\n\t}\n", implode(", ", $ps));
+ fprintf($out, "%s)", implode(", ", $ps));
+ if ($f->hasReturnType()) {
+ fprintf($out, " : %s%s", $f->getReturnType()->allowsNull() ? "?":"", $f->getReturnType()->getName());
+ }
+ fprintf($out, " {\n\t}\n");