Utils: fixed parseDocComment() ignoring tags containing hyphens

This commit is contained in:
Dylan K. Taylor
2021-11-24 16:38:37 +00:00
parent 5c7125f190
commit b784a04e08
2 changed files with 7 additions and 1 deletions

View File

@ -506,7 +506,7 @@ final class Utils{
if($rawDocComment === false){ //usually empty doc comment, but this is safer and statically analysable
return [];
}
preg_match_all('/(*ANYCRLF)^[\t ]*(?:\* )?@([a-zA-Z]+)(?:[\t ]+(.+?))?[\t ]*$/m', $rawDocComment, $matches);
preg_match_all('/(*ANYCRLF)^[\t ]*(?:\* )?@([a-zA-Z\-]+)(?:[\t ]+(.+?))?[\t ]*$/m', $rawDocComment, $matches);
return array_combine($matches[1], $matches[2]);
}