(goType string)
| 188 | } |
| 189 | |
| 190 | func (cp *classParser) goTypeToPHPType(goType string) phpType { |
| 191 | goType = strings.TrimPrefix(goType, "*") |
| 192 | |
| 193 | if phpType, exists := goToPhpTypeMap[goType]; exists { |
| 194 | return phpType |
| 195 | } |
| 196 | |
| 197 | if strings.HasPrefix(goType, "[]") || strings.HasPrefix(goType, "map[") { |
| 198 | return phpArray |
| 199 | } |
| 200 | |
| 201 | return phpMixed |
| 202 | } |
| 203 | |
| 204 | func (cp *classParser) parseMethods(filename string) ([]phpClassMethod, error) { |
| 205 | src, err := os.ReadFile(filename) |
no outgoing calls