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

Function phpStringContent

src/extraction/function-ref.ts:867–872  ·  view source on GitHub ↗

Content of a PHP string literal node (single- or double-quoted).

(node: SyntaxNode, source: string)

Source from the content-addressed store, hash-verified

865
866/** Content of a PHP string literal node (single- or double-quoted). */
867function phpStringContent(node: SyntaxNode, source: string): string | null {
868 for (const child of namedChildrenOf(node)) {
869 if (child?.type === 'string_content') return getNodeText(child, source).trim();
870 }
871 return null;
872}
873
874/** The function name of the PHP call whose arguments contain `node`, if any. */
875function phpEnclosingCallName(node: SyntaxNode): string | null {

Callers 1

normalizeSpecialFunction · 0.85

Calls 2

namedChildrenOfFunction · 0.90
getNodeTextFunction · 0.90

Tested by

no test coverage detected