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

Function method

__tests__/php-import-alias-static-resolution.test.ts:27–33  ·  view source on GitHub ↗
(qualifiedName: string)

Source from the content-addressed store, hash-verified

25 cg = await CodeGraph.init(dir, { silent: true });
26 await cg.indexAll();
27 const method = (qualifiedName: string) => {
28 const node = cg!.searchNodes(qualifiedName.split('::').pop()!)
29 .map((result) => result.node)
30 .find((n) => n.qualifiedName === qualifiedName);
31 expect(node, qualifiedName).toBeDefined();
32 return node!;
33 };
34 const excel = method('App\\Http\\Controllers\\Backend::SettleController::excel');
35 const service = method('App\\Services::SettleService::getSettlesToExcel');
36 const repository = method('App\\Repositories::SettleRepository::getSettlesToExcel');

Calls 2

mapMethod · 0.80
searchNodesMethod · 0.65

Tested by

no test coverage detected