$vendorLen = 0;
$vendor = '';
} else { $vendor =
str_replace('_', '\\',
substr($class, 0,
$vendorLen));
} $parent =
get_parent_class($class) ?: null;
self::
$returnTypes[$class] =
[];
$classIsTemplate = false;
// Detect annotations on the class
if ($doc =
$this->
parsePhpDoc($refl)) { $classIsTemplate =
isset($doc['template'
]) ||
isset($doc['template-covariant'
]);
foreach (['final', 'deprecated', 'internal'
] as $annotation) { if (null !==
$description =
$doc[$annotation][0
] ?? null
) { self::$
{$annotation}[$class] = '' !==
$description ? ' '.
$description.
(preg_match('/[.!]$/',
$description) ? '' : '.'
) : '.';
} } if ($refl->
isInterface() &&
isset($doc['method'
])) { foreach ($doc['method'
] as $name =>
[$static,
$returnType,
$signature,
$description]) { self::
$method[$class][] =
[$class,
$static,
$returnType,
$name.
$signature,
$description];