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

Function emitHookRef

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

Source from the content-addressed store, hash-verified

243 }
244
245 const emitHookRef = (hookName: string, funcName: string) => {
246 const lineNum = funcLineMap.get(funcName);
247 if (lineNum === undefined) return;
248 const nodeId = generateNodeId(filePath, 'function', funcName, lineNum);
249 references.push({
250 fromNodeId: nodeId,
251 referenceName: hookName,
252 referenceKind: 'references',
253 line: lineNum,
254 column: 0,
255 filePath,
256 language: 'php',
257 });
258 };
259
260 // Strategy A: docblock `Implements hook_X().` followed by function definition.
261 // The docblock and function may be separated by blank lines.

Callers 1

extractDrupalHooksFunction · 0.85

Calls 2

generateNodeIdFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected