()
| 72 | }); |
| 73 | |
| 74 | function imports(): string[] { |
| 75 | const db = (cg as unknown as { db: { getDb(): { prepare(sql: string): { all(...a: unknown[]): Array<{ s: string; t: string; l: number }> } } } }).db; |
| 76 | return db.getDb().prepare(` |
| 77 | SELECT s.kind || ' ' || s.qualified_name s, t.file_path t, e.line l FROM edges e |
| 78 | JOIN nodes s ON s.id = e.source JOIN nodes t ON t.id = e.target |
| 79 | WHERE e.kind = 'imports' AND t.kind = 'file'`).all().map((r) => `${r.s} -> ${r.t} @${r.l}`).sort(); |
| 80 | } |
| 81 | |
| 82 | describe('a PHP include inside a function body (#3296)', () => { |
| 83 | it('links the function, or the method, to the file it includes; a top-level include stays the file\'s', () => { |
no test coverage detected