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

Function emit

src/resolution/frameworks/drupal.ts:529–539  ·  view source on GitHub ↗
(hook: string, method: string, line: number)

Source from the content-addressed store, hash-verified

527function oopHookReferences(filePath: string, content: string, declarations: readonly AttributedDeclaration[]): UnresolvedRef[] {
528 const references: UnresolvedRef[] = [];
529 const emit = (hook: string, method: string, line: number): void => {
530 references.push({
531 fromNodeId: generateNodeId(filePath, 'method', method, line),
532 referenceName: `hook_${hook}`,
533 referenceKind: 'references',
534 line,
535 column: 0,
536 filePath,
537 language: 'php',
538 });
539 };
540 const lineOf = makeLineAt(content, 1);
541 for (const decl of declarations) {
542 for (const attribute of decl.attributes) {

Callers 1

oopHookReferencesFunction · 0.70

Calls 2

generateNodeIdFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected