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

Function phpArrayBody

src/resolution/callback-synthesizer.ts:5159–5166  ·  view source on GitHub ↗

From an opening `[`, the bracket-balanced body up to its matching `]`.

(src: string, openIdx: number)

Source from the content-addressed store, hash-verified

5157
5158/** From an opening `[`, the bracket-balanced body up to its matching `]`. */
5159function phpArrayBody(src: string, openIdx: number): string | null {
5160 let depth = 0;
5161 for (let i = openIdx; i < src.length; i++) {
5162 if (src[i] === '[') depth++;
5163 else if (src[i] === ']' && --depth === 0) return src.slice(openIdx + 1, i);
5164 }
5165 return null;
5166}
5167
5168async function laravelEventEdges(ctx: ResolutionContext, onYield: MaybeYield): Promise<Edge[]> {
5169 let scannedFiles = 0;

Callers 1

laravelEventEdgesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected