public function typeLinks($annotation, ElementReflectionInterface $reflectionElement)
{
$links = [];
// typehints can not contains spaces
// valid typehint is:
// [TYPE[|TYPE[|...]][SPACE[METHOD|PARAM][DESCRIPTION]]
$parts = explode(' ', $annotation);
foreach (explode('|', $parts[0]) as $type) {
$type = $this->getTypeName($type, false);
$links[] = $this->resolveLink($type, $reflectionElement) ?: LatteFilters::escapeHtml(ltrim($type, '\\'));
}
return implode('|', $links);
}