* The methods a PHP class declares as `member`: spelled exactly so, else in * any letter case, since PHP reads method names without regard to it (#3297).
(owner: Node, member: string, context: ResolutionContext)
| 3173 | * any letter case, since PHP reads method names without regard to it (#3297). |
| 3174 | */ |
| 3175 | function phpOwnMethods(owner: Node, member: string, context: ResolutionContext): Node[] { |
| 3176 | const exact = context.getNodesByQualifiedName(`${owner.qualifiedName}::${member}`) |
| 3177 | .filter((n) => n.language === 'php' && n.kind === 'method' && n.filePath === owner.filePath); |
| 3178 | if (exact.length > 0) return exact; |
| 3179 | const want = `${owner.qualifiedName}::${member}`.toLowerCase(); |
| 3180 | return context.getNodesInFile(owner.filePath) |
| 3181 | .filter((n) => n.language === 'php' && n.kind === 'method' && n.qualifiedName.toLowerCase() === want); |
| 3182 | } |
| 3183 | |
| 3184 | /** |
| 3185 | * A module specifier written as a path — relative (`./x`, `../x`), rooted, or |
no test coverage detected