phpIsDocumentRoot (#3298): `$_SERVER['DOCUMENT_ROOT']`, in either quote and with any spacing inside the brackets — a `subscript_expression` of exactly the `variable_name` `$_SERVER` and a pure string literal `DOCUMENT_ROOT`.
(&self, node: Node<'t>)
| 1031 | /// `subscript_expression` of exactly the `variable_name` `$_SERVER` and |
| 1032 | /// a pure string literal `DOCUMENT_ROOT`. |
| 1033 | fn php_is_document_root(&self, node: Node<'t>) -> bool { |
| 1034 | node.kind() == "subscript_expression" |
| 1035 | && node.named_child_count() == 2 |
| 1036 | && node |
| 1037 | .named_child(0) |
| 1038 | .is_some_and(|v| v.kind() == "variable_name" && self.text(v) == "$_SERVER") |
| 1039 | && node.named_child(1).and_then(|key| self.php_literal_text(key)) == Some("DOCUMENT_ROOT") |
| 1040 | } |
| 1041 | |
| 1042 | /// phpAppendedPath (#3298): the path string literals (and |
| 1043 | /// `DIRECTORY_SEPARATOR`, read as `/`) append to a directory. It starts |
no test coverage detected