| 119 | } |
| 120 | |
| 121 | func (cp *classParser) extractPHPClassCommentWithLine(commentGroup *ast.CommentGroup, fset *token.FileSet) (string, int) { |
| 122 | if commentGroup == nil { |
| 123 | return "", 0 |
| 124 | } |
| 125 | |
| 126 | for _, comment := range commentGroup.List { |
| 127 | if matches := phpClassRegex.FindStringSubmatch(comment.Text); matches != nil { |
| 128 | pos := fset.Position(comment.Pos()) |
| 129 | return matches[1], pos.Line |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | return "", 0 |
| 134 | } |
| 135 | |
| 136 | func (cp *classParser) parseStructFields(fields []*ast.Field) []phpClassProperty { |
| 137 | var properties []phpClassProperty |