mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-06-02 21:03:32 +00:00
Additional refactoring in the coverage classes.
This commit is contained in:
parent
9303de936e
commit
67e32e292d
3 changed files with 28 additions and 20 deletions
cake/tests/lib/coverage
|
@ -58,8 +58,8 @@ HTML;
|
|||
public function generateDiff($filename, $fileLines, $coverageData) {
|
||||
$output = '';
|
||||
$diff = array();
|
||||
$covered = 0;
|
||||
$total = 0;
|
||||
|
||||
list($covered, $total) = $this->_calculateCoveredLines($fileLines, $coverageData);
|
||||
|
||||
//shift line numbers forward one;
|
||||
array_unshift($fileLines, ' ');
|
||||
|
@ -73,11 +73,8 @@ HTML;
|
|||
$this->_rawCoverage, $filename, $lineno
|
||||
);
|
||||
$class = 'covered';
|
||||
$covered++;
|
||||
$total++;
|
||||
} elseif (isset($coverageData['executable'][$lineno])) {
|
||||
$class = 'uncovered';
|
||||
$total++;
|
||||
} elseif (isset($coverageData['dead'][$lineno])) {
|
||||
$class .= ' dead';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue