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

Function emitHookRef

src/resolution/frameworks/drupal.ts:256–269  ·  view source on GitHub ↗
(hookName: string, funcName: string)

Source from the content-addressed store, hash-verified

254 }
255
256 const emitHookRef = (hookName: string, funcName: string) => {
257 const lineNum = funcLineMap.get(funcName);
258 if (lineNum === undefined) return;
259 const nodeId = generateNodeId(filePath, 'function', funcName, lineNum);
260 references.push({
261 fromNodeId: nodeId,
262 referenceName: hookName,
263 referenceKind: 'references',
264 line: lineNum,
265 column: 0,
266 filePath,
267 language: 'php',
268 });
269 };
270
271 // Strategy A: docblock `Implements hook_X().` followed by function definition.
272 // The docblock and function may be separated by blank lines.

Callers 1

extractDrupalHooksFunction · 0.85

Calls 3

generateNodeIdFunction · 0.90
pushMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected