Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make test cases covering each line unique
merge() function uses array_unique(), here it was forgotten. The coverage object was growing out of bounds.
  • Loading branch information
petrusek committed Feb 5, 2015
commit dca6c6fcb04060e9c0e600336ca416e139282814
4 changes: 3 additions & 1 deletion src/CodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ public function append(array $data, $id = null, $append = true, $linesToBeCovere

foreach ($lines as $k => $v) {
if ($v == 1) {
$this->data[$file][$k][] = $id;
if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) {
$this->data[$file][$k][] = $id;
}
}
}
}
Expand Down