The files a PHP file's includes link to.
(graph: CodeGraph, file: string)
| 145 | |
| 146 | /** The files a PHP file's includes link to. */ |
| 147 | function phpIncludeTargets(graph: CodeGraph, file: string): string[] { |
| 148 | return graph.getNodesInFile(file) |
| 149 | .flatMap((n) => graph.getOutgoingEdges(n.id)) |
| 150 | .filter((e) => e.kind === 'imports' && graph.getNode(e.target)?.kind === 'file') |
| 151 | .map((e) => graph.getNode(e.target)!.filePath) |
| 152 | .sort(); |
| 153 | } |
| 154 | |
| 155 | /** What a full index of C_BEFORE holds under a compile database naming `dir`, which names the folder it's in. */ |
| 156 | async function fullIndexWithDb(dir: string): Promise<string[]> { |
no test coverage detected