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

Function callees

__tests__/php-method-name-case.test.ts:117–123  ·  view source on GitHub ↗

The qualified names of what `calls` edges from `caller` reach.

(caller: string)

Source from the content-addressed store, hash-verified

115
116/** The qualified names of what `calls` edges from `caller` reach. */
117function callees(caller: string): string[] {
118 const db = (cg as unknown as { db: { getDb(): { prepare(sql: string): { all(...a: unknown[]): Array<{ q: string }> } } } }).db;
119 return db.getDb().prepare(`
120 SELECT t.qualified_name q FROM edges e
121 JOIN nodes s ON s.id = e.source JOIN nodes t ON t.id = e.target
122 WHERE e.kind = 'calls' AND s.qualified_name = ?`).all(caller).map((r) => r.q).sort();
123}
124
125describe('PHP method names are matched without regard to case (#3297)', () => {
126 it("the issue's repro: all four functions call the methods", () => {

Callers 1

Calls 4

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

Tested by

no test coverage detected