in src/PageSections/InterfaceSynopsis.hack [58:110]
public function getMarkdown(): ?string {
$c = $this->definition;
if (!$c is ScannedClassish) {
return null;
}
$methods = vec($this->walkMethods($c));
$defining_classes = Keyset\map($methods, $cm ==> $cm[0]->getName());
$public_methods = vec[];
$protected_methods = vec[];
$private_methods = vec[];
foreach ($defining_classes as $dc) {
$suffix = $dc === $c->getName() ? '' : ' (`'.$dc.'`)';
$public_methods[] = $this->getMethodList(
'### Public Methods'.$suffix,
Vec\filter(
$methods,
$cm ==> $dc === $cm[0]->getName() && $cm[1]->isPublic(),
),
);
$protected_methods[] = $this->getMethodList(
'### Protected Methods'.$suffix,
Vec\filter(
$methods,
$cm ==> $dc === $cm[0]->getName() && $cm[1]->isProtected(),
),
);
if ($dc !== $c) {
// Never show inherited private methods
continue;
}
if ($this->context->getConfiguration()['hidePrivateMethods']) {
continue;
}
$private_methods[] = $this->getMethodList(
'### Private Methods'.$suffix,
Vec\filter(
$methods,
$cm ==> $dc === $cm[0]->getName() && $cm[1]->isPrivate(),
),
);
}
return "## Interface Synopsis\n\n".
$this->getInheritanceInformation($c).
"\n\n".
(
Vec\concat($public_methods, $protected_methods, $private_methods)
|> Vec\filter_nulls($$)
|> Str\join($$, "\n\n")
);
}