private function getType(Tag $tag) : array
{
$type = $this->getTypeFromTag($tag);
if (!$type) {
return $type;
}
$typeDesc = $type[0];
if ($typeDesc === strtolower($typeDesc)) {
$typeDesc = $this->normalizeType($typeDesc);
// match all-lowercase types against known types
if (!in_array($typeDesc, static::TYPES)) {
return [];
}
}
return $type;
}