Skip to content

Commit

Permalink
Only show missed lines when there are missed lines
Browse files Browse the repository at this point in the history
  • Loading branch information
exussum12 committed Feb 7, 2017
1 parent 1b0e99b commit 8e3bca4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,16 @@ function handleOutput($lines, $minimumPercentCovered)

$percentCovered = 100 * ($coveredLines / ($coveredLines + $uncoveredLines));

echo "$percentCovered% Covered, Missed lines " . PHP_EOL;
print_r($lines['uncoveredLines']);
$extra = PHP_EOL;

if ($lines['uncoveredLines']) {
$extra = ', Missed lines '.
$extra .
print_r($lines['uncoveredLines'], true)
;
}

printf('%.2f% Covered%s', $percentCovered, $extra);

if ($percentCovered >= $minimumPercentCovered) {
exit(0);
Expand Down

0 comments on commit 8e3bca4

Please sign in to comment.