* 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)
| 2925 | * any letter case, since PHP reads method names without regard to it (#3297). |
| 2926 | */ |
| 2927 | function phpOwnMethods(owner: Node, member: string, context: ResolutionContext): Node[] { |
| 2928 | const exact = context.getNodesByQualifiedName(`${owner.qualifiedName}::${member}`) |
| 2929 | .filter((n) => n.language === 'php' && n.kind === 'method' && n.filePath === owner.filePath); |
| 2930 | if (exact.length > 0) return exact; |
| 2931 | const want = `${owner.qualifiedName}::${member}`.toLowerCase(); |
| 2932 | return context.getNodesInFile(owner.filePath) |
| 2933 | .filter((n) => n.language === 'php' && n.kind === 'method' && n.qualifiedName.toLowerCase() === want); |
| 2934 | } |
| 2935 | |
| 2936 | /** |
| 2937 | * A module specifier written as a path — relative (`./x`, `../x`), rooted, or |
no test coverage detected