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

Function libFiles

__tests__/php-web-root-includes.test.ts:146–147  ·  view source on GitHub ↗
(dir: string, count: number)

Source from the content-addressed store, hash-verified

144
145/** `count` files under `dir`'s lib/ (`lib/f1.php`, …), each defining a function. */
146const libFiles = (dir: string, count: number): Files =>
147 Object.fromEntries(Array.from({ length: count }, (_, i) => [`${dir ? `${dir}/` : ''}lib/f${i + 1}.php`, fn(`f${i + 1}`)]));
148/** A page's includes of `/lib/f1.php` … `/lib/f<count>.php` from the web root. */
149const includesOf = (count: number): string =>
150 Array.from({ length: count }, (_, i) => `require_once $_SERVER['DOCUMENT_ROOT'] . '/lib/f${i + 1}.php';`).join('\n');

Callers 1

Calls 2

fromMethod · 0.80
fnFunction · 0.70

Tested by

no test coverage detected