findMatchingComment returns the raw comment text whose line matches re.
(group *ast.CommentGroup, re *regexp.Regexp)
| 274 | |
| 275 | // findMatchingComment returns the raw comment text whose line matches re. |
| 276 | func findMatchingComment(group *ast.CommentGroup, re *regexp.Regexp) string { |
| 277 | if group == nil { |
| 278 | return "" |
| 279 | } |
| 280 | for _, comment := range group.List { |
| 281 | if re.MatchString(comment.Text) { |
| 282 | return comment.Text |
| 283 | } |
| 284 | } |
| 285 | return "" |
| 286 | } |
| 287 | |
| 288 | func (cp *classParser) parseMethodSignature(className, signature string) (*phpClassMethod, error) { |
| 289 | name, params, returnType, nullable, err := parseSignatureParams(signature) |