array $defects:
integer $count:
string $type:
protected function printDefects(array $defects, $count, $type) {
static $called = FALSE;
if ($count == 0) {
return;
}
$this
->write(sprintf("%sThere %s %d %s%s:\n", $called ? "\n" : '', $count == 1 ? 'was' : 'were', $count, $type, $count == 1 ? '' : 's'));
$i = 1;
foreach ($defects as $defect) {
$this
->printDefect($defect, $i++);
}
$called = TRUE;
}