MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / php_file_edges

Function php_file_edges

tests/test_parallel.c:4964–4979  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4962}
4963
4964static int php_file_edges(const cbm_gbuf_t *gbuf, const char *type, const char *source,
4965 const char *target) {
4966 char *source_qn = cbm_pipeline_fqn_compute("cbm_par_phpvendor", source, "__file__");
4967 char *target_qn = cbm_pipeline_fqn_compute("cbm_par_phpvendor", target, "__file__");
4968 const cbm_gbuf_node_t *s = source_qn ? cbm_gbuf_find_by_qn(gbuf, source_qn) : NULL;
4969 const cbm_gbuf_node_t *t = target_qn ? cbm_gbuf_find_by_qn(gbuf, target_qn) : NULL;
4970 bool files_exist = s && t && s->label && t->label && strcmp(s->label, "File") == 0 &&
4971 strcmp(t->label, "File") == 0;
4972 free(source_qn);
4973 free(target_qn);
4974 if (!files_exist)
4975 return -1;
4976 php_file_edge_count_t c = {.gbuf = gbuf, .type = type, .src_rel = source, .tgt_rel = target};
4977 cbm_gbuf_foreach_node(gbuf, php_count_source_edges, &c);
4978 return c.query_failed || c.source_nodes == 0 ? -1 : c.count;
4979}
4980
4981static bool php_vendor_extracted_sites(void) {
4982 for (int file = 3; file < PHP_VENDOR_FILE_COUNT; file++) {

Callers 1

php_vendor_graph_okFunction · 0.85

Calls 3

cbm_pipeline_fqn_computeFunction · 0.85
cbm_gbuf_find_by_qnFunction · 0.85
cbm_gbuf_foreach_nodeFunction · 0.85

Tested by

no test coverage detected