private static function getFunctionTypeText()

in src/definitions/ScannedTypehint.hack [181:201]


  private static function getFunctionTypeText(
    string $relative_to_namespace,
    int $options,
    vec<(?InoutToken, ScannedTypehint, ?DotDotDotToken)> $parameter_types,
    ScannedTypehint $return_type,
  ): string {
    return Str\format(
      '(function(%s)%s)',
      Vec\map(
        $parameter_types,
        $type_info ==> {
          list($inout, $type, $ellipsis) = $type_info;
          return ($inout is nonnull ? $inout->getText().' ' : '').
            $type->getTypeText($relative_to_namespace, $options).
            ($ellipsis is nonnull ? ' '.$ellipsis->getText() : '');
        },
      )
        |> Str\join($$, ', '),
      ': '.$return_type->getTypeText($relative_to_namespace, $options),
    );
  }