public static function substringAfter($haystack, $needle)
{
$pos = strpos($haystack, $needle);
if (false === $pos) {
return $haystack;
}
return trim(substr($haystack, $pos + strlen($needle)));
}
function extract_doc_annotations($comment, $annotation) { $values = []; foreach (explode("\n", $comment) as $line) { if (!Str::startsWith(trim($line), '* ' . $annotation)) { continue; } $value = Str::substringAfter($line, $annotation); if ($value !== '') { $values[] = trim($value); } } return $values; }