| 2872 | } |
| 2873 | |
| 2874 | static yyjson_mut_val *php_binding_json(yyjson_mut_doc *doc, const CBMImport *imp, |
| 2875 | const char *target) { |
| 2876 | yyjson_mut_val *obj = yyjson_mut_obj(doc); |
| 2877 | if (!obj || !php_json_add_string(doc, obj, "local_name", imp->local_name) || |
| 2878 | !php_json_add_string(doc, obj, "module_path", imp->module_path) || |
| 2879 | !yyjson_mut_obj_add_int(doc, obj, "kind", imp->kind) || |
| 2880 | !yyjson_mut_obj_add_bool(doc, obj, "is_default", imp->is_default) || |
| 2881 | !php_json_add_string(doc, obj, "target", target)) { |
| 2882 | return NULL; |
| 2883 | } |
| 2884 | return obj; |
| 2885 | } |
| 2886 | |
| 2887 | /* Validate the entire snapshot, including bindings that coalesced into one |
| 2888 | * (source, target, local_name) edge. A positive insertion ID alone is not |
no test coverage detected