MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / callees

Function callees

__tests__/php-anonymous-class-scope.test.ts:223–230  ·  view source on GitHub ↗

What `calls` edges from `caller` reach, as `line target`.

(caller: string)

Source from the content-addressed store, hash-verified

221
222/** What `calls` edges from `caller` reach, as `line target`. */
223function callees(caller: string): string[] {
224 const db = (cg as unknown as { db: { getDb(): { prepare(sql: string): { all(...a: unknown[]): Array<{ q: string; line: number }> } } } }).db;
225 return db.getDb().prepare(`
226 SELECT t.qualified_name q, e.line line FROM edges e
227 JOIN nodes s ON s.id = e.source JOIN nodes t ON t.id = e.target
228 WHERE e.kind = 'calls' AND s.qualified_name = ? ORDER BY e.line, t.qualified_name`).all(caller)
229 .map((r) => `${r.line} ${r.q}`);
230}
231
232const TEST = 'Illuminate\\Tests\\Queue::QueuePauseResumeTest';
233

Calls 4

mapMethod · 0.80
getDbMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected