MCPcopy Index your code
hub / github.com/php/frankenphp / goTypeToPHPType

Method goTypeToPHPType

internal/extgen/classparser.go:190–202  ·  view source on GitHub ↗
(goType string)

Source from the content-addressed store, hash-verified

188}
189
190func (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
204func (cp *classParser) parseMethods(filename string) ([]phpClassMethod, error) {
205 src, err := os.ReadFile(filename)

Callers 2

TestGoTypeToPHPTypeFunction · 0.95
parseStructFieldMethod · 0.95

Calls

no outgoing calls

Tested by 1

TestGoTypeToPHPTypeFunction · 0.76