public function getReturnInfo()

in src/DocBlock/DocBlock.hack [192:224]


  public function getReturnInfo(): vec<ReturnInfo> {
    $out = vec[];
    foreach ($this->tags as list($key, $value)) {
      if ($key !== '@return' && $key !== '@returns') {
        continue;
      }
      if ($value === null) {
        continue;
      }

      $space = Str\search($value, ' ');
      if ($space === null) {
        $out[] = shape('type' => $value, 'text' => null);
        continue;
      }

      $text = Str\trim(Str\slice($value, $space));
      if ($text === '') {
        $text = null;
      }
      $out[] = shape(
        'type' => Str\slice($value, 0, $space),
        'text' => $text,
      );
    }
    return Vec\map(
      $out,
      $x ==> shape(
        'text' => $x['text'],
        'types' => self::typeToTypes($x['type']),
      ),
    );
  }