Skip to content

Commit 35fa5c6

Browse files
Apply blacklist/whitelist filtering earlier.
1 parent f8d124e commit 35fa5c6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

PHP/CodeCoverage.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,12 @@ public function append(array $data, $id = NULL)
228228
}
229229
}
230230

231-
unset($filename);
231+
// Apply blacklist/whitelist filtering.
232+
foreach (array_keys($data) as $filename) {
233+
if ($this->filter->isFiltered($filename)) {
234+
unset($data[$filename]);
235+
}
236+
}
232237

233238
// Process files that are covered for the first time.
234239
$newFiles = array_diff_key($data, $this->coveredFiles);
@@ -270,13 +275,6 @@ public function append(array $data, $id = NULL)
270275
$data = array();
271276
}
272277

273-
// Apply blacklist/whitelist filtering.
274-
foreach (array_keys($data) as $filename) {
275-
if ($this->filter->isFiltered($filename)) {
276-
unset($data[$filename]);
277-
}
278-
}
279-
280278
if (!empty($data)) {
281279
if ($id instanceof PHPUnit_Framework_TestCase) {
282280
$status = $id->getStatus();

0 commit comments

Comments
 (0)