Beispiel #1
0
    foreach ($build_groups as $build_group) {
        // Skip groups that don't have any data for this tool.
        $found = false;
        for ($i = 0; $i < $date_range; $i++) {
            if (array_key_exists($checker, $dynamic_analysis_data[$i][$build_group["name"]])) {
                $found = true;
                break;
            }
        }
        if (!$found) {
            continue;
        }
        $xml .= "<group>";
        $xml .= add_XML_value("group_name", $build_group["name"]);
        $xml .= add_XML_value("group_name_clean", sanitize_string($build_group["name"]));
        $chart_data = get_DA_chart_data($build_group["name"], $checker);
        $xml .= add_XML_value("chart", $chart_data);
        $value = get_current_DA_value($build_group["name"], $checker);
        $xml .= add_XML_value("value", $value);
        $xml .= "</group>";
    }
    $xml .= "</dynamicanalysis>";
}
// static analysis
foreach ($static_groups as $static_group) {
    // Skip this group if no data was found for it.
    $found = false;
    for ($i = 0; $i < $date_range; $i++) {
        $static_array =& $overview_data[$i][$static_group["name"]];
        foreach ($static_measurements as $measurement) {
            if (array_key_exists($measurement, $static_array)) {
Beispiel #2
0
    foreach ($build_groups as $build_group) {
        // Skip groups that don't have any data for this tool.
        $found = false;
        for ($i = 0; $i < $date_range; $i++) {
            if (array_key_exists($checker, $dynamic_analysis_data[$i][$build_group['name']])) {
                $found = true;
                break;
            }
        }
        if (!$found) {
            continue;
        }
        $group_response = array();
        $group_response['name'] = $build_group['name'];
        $group_response['name_clean'] = sanitize_string($build_group['name']);
        $chart_data = get_DA_chart_data($build_group['name'], $checker);
        $group_response['chart'] = $chart_data;
        $value = get_current_DA_value($build_group['name'], $checker);
        $group_response['value'] = $value;
        $groups_response[] = $group_response;
    }
    $DA_response['groups'] = $groups_response;
    $dynamic_analyses_response[] = $DA_response;
}
$response['dynamicanalyses'] = $dynamic_analyses_response;
// static analysis
$static_analyses_response = array();
foreach ($static_groups as $static_group) {
    // Skip this group if no data was found for it.
    $found = false;
    for ($i = 0; $i < $date_range; $i++) {