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

Function callees

__tests__/php-import-alias-static-resolution.test.ts:58–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 const serviceMethod = 'App\\Services::SettleService::getSettlesToExcel';
57
58 const callees = async () => {
59 cg = await CodeGraph.init(dir, { silent: true });
60 await cg.indexAll();
61 const excel = cg.searchNodes('excel').map(({ node }) => node)
62 .find((n) => n.kind === 'method' && n.filePath === controllerPath)!;
63 expect(excel).toBeDefined();
64 return cg.getCallees(excel.id).map(({ node }) => node.qualifiedName).sort();
65 };
66
67 it('uses the imported namespace even when another namespace declares SettleService', async () => {
68 write('app/Repositories/SettleService.php', serviceSource.replace('App\\Services', 'App\\Repositories'));

Calls 5

mapMethod · 0.80
searchNodesMethod · 0.65
initMethod · 0.45
indexAllMethod · 0.45
getCalleesMethod · 0.45

Tested by

no test coverage detected