protected function _renderMetrics($metrics, $verbosity)
{
$maxLabelWidth = null;
if ($verbosity === 1) {
return;
}
$metricsReport = $this->_getMetricsReport($metrics->children(), $verbosity, 0, 3, $maxLabelWidth);
$name = $metrics->name() ?: '\\';
$maxLabelWidth = max(strlen($name) + 1, $maxLabelWidth);
$maxLabelWidth += 4;
$stats = $metrics->data();
$percent = number_format($stats['percent'], 2);
$style = $this->_style($percent);
$maxLineWidth = strlen($stats['lloc']);
$this->write(str_repeat(' ', $maxLabelWidth));
$this->write(' ');
$this->write(str_pad('Lines', $maxLineWidth * 2 + 3, ' ', STR_PAD_BOTH));
$this->write(str_pad('%', 12, ' ', STR_PAD_LEFT));
$this->write("\n\n");
$this->write(str_pad(' ' . $name, $maxLabelWidth));
$this->write(' ');
$this->write(str_pad("{$stats['cloc']}", $maxLineWidth, ' ', STR_PAD_LEFT));
$this->write(' / ');
$this->write(str_pad("{$stats['lloc']}", $maxLineWidth, ' ', STR_PAD_LEFT));
$this->write(' ');
$this->write(str_pad("{$percent}%", 7, ' ', STR_PAD_LEFT), $style);
$this->write("\n");
$this->_renderMetricsReport($metricsReport, $maxLabelWidth, $maxLineWidth, 0);
}