| 4962 | } |
| 4963 | |
| 4964 | static 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 | |
| 4981 | static bool php_vendor_extracted_sites(void) { |
| 4982 | for (int file = 3; file < PHP_VENDOR_FILE_COUNT; file++) { |
no test coverage detected