From dca6c6fcb04060e9c0e600336ca416e139282814 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 5 Feb 2015 15:45:34 +0100 Subject: [PATCH] Make test cases covering each line unique merge() function uses array_unique(), here it was forgotten. The coverage object was growing out of bounds. --- src/CodeCoverage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CodeCoverage.php b/src/CodeCoverage.php index 5725917be..e3a57fdc7 100644 --- a/src/CodeCoverage.php +++ b/src/CodeCoverage.php @@ -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; + } } } }