Content of a PHP string literal node (single- or double-quoted).
(node: SyntaxNode, source: string)
| 865 | |
| 866 | /** Content of a PHP string literal node (single- or double-quoted). */ |
| 867 | function 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. */ |
| 875 | function phpEnclosingCallName(node: SyntaxNode): string | null { |
no test coverage detected