| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 33 | 
| Code Lines | 20 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 1 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 3 | function template_diff_per_rule(array $report) { | ||
| 4 | ?> | ||
| 5 | |||
| 6 | ==================================================================================== | ||
| 7 | DICTO - automated architectural tests (https://github.com/lechimp-p/dicto.php) | ||
| 8 | ==================================================================================== | ||
| 9 | report with emphasis on the diff | ||
| 10 | |||
| 11 | commit : <?= $report["current"]["commit_hash"] ?> | ||
| 12 | compared to : <?= $report["previous"]["commit_hash"] ?> | ||
| 13 | |||
| 14 | violations | ||
| 15 | total : <?= $report["violations"]["total"] ?> | ||
| 16 | added : <?= $report["violations"]["added"] ?> | ||
| 17 | resolved : <?= $report["violations"]["resolved"] ?> | ||
| 18 | |||
| 19 | <?php foreach ($report["rules"] as $rule) { ?> | ||
| 20 | ------------------------------------------------------------------------------------ | ||
| 21 | (!) <?= wordwrap($rule["rule"], 80, "\n ", true) ?> | ||
| 22 | ------------------------------------------------------------------------------------ | ||
| 23 |  <?= wordwrap(str_replace("\n", " ", $rule["explanation"]), 80, "\n ", false); ?>  | ||
| 24 | |||
| 25 | violations | ||
| 26 | total : <?= $rule["violations"]["total"] ?> | ||
| 27 | added : <?= $rule["violations"]["added"] ?> | ||
| 28 | resolved : <?= $rule["violations"]["resolved"] ?> | ||
| 29 | |||
| 30 | <?php   foreach ($rule["violations"]["list"] as $v) { ?> | ||
| 31 | <?= $v["file"] ?> (l. <?= $v["line_no"] ?>) | ||
| 32 | <?php } ?> | ||
| 33 | |||
| 34 | <?php } | ||
| 35 | } | ||
| 36 |