The function name node of the php call whose arguments contain `node` — ≤4 parent hops to a function_call_expression; member/scoped calls abort (method-call HOFs never qualify). (function-ref.ts:822)
(node: Node)
| 1638 | /// ≤4 parent hops to a function_call_expression; member/scoped calls abort |
| 1639 | /// (method-call HOFs never qualify). (function-ref.ts:822) |
| 1640 | fn php_enclosing_call_name(node: Node) -> Option<Node> { |
| 1641 | let mut cur = node.parent(); |
| 1642 | for _ in 0..4 { |
| 1643 | let c = cur?; |
| 1644 | if c.kind() == "function_call_expression" { |
| 1645 | return c.child_by_field_name("function"); |
| 1646 | } |
| 1647 | if matches!(c.kind(), "member_call_expression" | "scoped_call_expression") { |
| 1648 | return None; |
| 1649 | } |
| 1650 | cur = c.parent(); |
| 1651 | } |
| 1652 | None |
| 1653 | } |
| 1654 | |
| 1655 | /// PHP_DOCUMENT_ROOT (languages/php.ts, #3298): how an include built from |
| 1656 | /// `$_SERVER['DOCUMENT_ROOT']` is written, followed by the appended path. The |
no outgoing calls
no test coverage detected