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

Function hooks

__tests__/drupal-services.test.ts:166–167  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

164
165describe('a #[Hook] attribute', () => {
166 const hooks = (source: string): string[] =>
167 extract('src/Hook/ShopHooks.php', source).references.map((r) => `${r.referenceName}@${r.line}`);
168
169 it('links the method it marks, from the line the attribute starts on, where the method\'s node starts', () => {
170 expect(hooks(`<?php

Callers 1

Calls 2

mapMethod · 0.80
extractFunction · 0.70

Tested by

no test coverage detected