Permalink
Browse files

Fixed styling issues where the "lines covered" numbers would break 1 …

…or 2 times if the method names and parameter list was to long
  • Loading branch information...
1 parent 85b8fc0 commit 25232ac64f081abd7478ae2d63fdb757f45e92b9 @edorian edorian committed Feb 14, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 PHP/CodeCoverage/Report/HTML/Renderer.php
@@ -113,14 +113,15 @@ public function __construct($templatePath, $charset, $generator, $date, $lowUppe
*/
protected function renderItemTemplate(Text_Template $template, array $data)
{
+ $numSeperator = ' / ';
$classesBar = ' ';
$classesLevel = 'None';
$classesNumber = ' ';
if (isset($data['numClasses']) && $data['numClasses'] > 0) {
$classesLevel = $this->getColorLevel($data['testedClassesPercent']);
- $classesNumber = $data['numTestedClasses'] . ' / ' .
+ $classesNumber = $data['numTestedClasses'] . $numSeperator .
$data['numClasses'];
$classesBar = $this->getCoverageBar(
@@ -135,7 +136,7 @@ protected function renderItemTemplate(Text_Template $template, array $data)
if ($data['numMethods'] > 0) {
$methodsLevel = $this->getColorLevel($data['testedMethodsPercent']);
- $methodsNumber = $data['numTestedMethods'] . ' / ' .
+ $methodsNumber = $data['numTestedMethods'] . $numSeperator .
$data['numMethods'];
$methodsBar = $this->getCoverageBar(
@@ -150,7 +151,7 @@ protected function renderItemTemplate(Text_Template $template, array $data)
if ($data['numExecutableLines'] > 0) {
$linesLevel = $this->getColorLevel($data['linesExecutedPercent']);
- $linesNumber = $data['numExecutedLines'] . ' / ' .
+ $linesNumber = $data['numExecutedLines'] . $numSeperator .
$data['numExecutableLines'];
$linesBar = $this->getCoverageBar(

1 comment on commit 25232ac

@edorian
Collaborator

This is one of the instances where the numbers where on two lines. For other cases and resolutions for me it was

Sample

1 / 1

which looked really ugly

Please sign in to comment.