| @@ 51-64 (lines=14) @@ | ||
| 48 | , "added" => $this->queries->count_added_violations($prev_run, $cur_run, $rule) |
|
| 49 | , "resolved" => $this->queries->count_resolved_violations($prev_run, $cur_run, $rule) |
|
| 50 | , "list" => array_map |
|
| 51 | ( function($v) use ($current, $source_url) { |
|
| 52 | if ($source_url !== null) { |
|
| 53 | $v["url"] = $this->make_url |
|
| 54 | ( $source_url |
|
| 55 | , $current["commit_hash"] |
|
| 56 | , $v["file"] |
|
| 57 | , $v["line_no"] |
|
| 58 | ); |
|
| 59 | } |
|
| 60 | else { |
|
| 61 | $v["url"] = null; |
|
| 62 | } |
|
| 63 | return $v; |
|
| 64 | } |
|
| 65 | , $this->queries->violations_of($rule, $cur_run) |
|
| 66 | ) |
|
| 67 | ] |
|
| @@ 46-59 (lines=14) @@ | ||
| 43 | , "violations" => |
|
| 44 | [ "total" => $this->queries->count_violations_in($cur_run, $rule) |
|
| 45 | , "list" => array_map |
|
| 46 | ( function($v) use ($current, $source_url) { |
|
| 47 | if ($source_url !== null) { |
|
| 48 | $v["url"] = $this->make_url |
|
| 49 | ( $source_url |
|
| 50 | , $current["commit_hash"] |
|
| 51 | , $v["file"] |
|
| 52 | , $v["line_no"] |
|
| 53 | ); |
|
| 54 | } |
|
| 55 | else { |
|
| 56 | $v["url"] = null; |
|
| 57 | } |
|
| 58 | return $v; |
|
| 59 | } |
|
| 60 | , $this->queries->violations_of($rule, $cur_run) |
|
| 61 | ) |
|
| 62 | ] |
|