Appends code coverage data.
array $data:
mixed $id:
boolean $append:
public function append(array $data, $id = NULL, $append = TRUE) {
if ($id === NULL) {
$id = $this->currentId;
}
if ($id === NULL) {
throw new PHP_CodeCoverage_Exception();
}
$this
->applyListsFilter($data);
$this
->initializeFilesThatAreSeenTheFirstTime($data);
if (!$append) {
return;
}
if ($id != 'UNCOVERED_FILES_FROM_WHITELIST') {
$this
->applyCoversAnnotationFilter($data, $id);
}
if (empty($data)) {
return;
}
$status = NULL;
if ($id instanceof PHPUnit_Framework_TestCase) {
$status = $id
->getStatus();
$id = get_class($id) . '::' . $id
->getName();
}
else {
if ($id instanceof PHPUnit_Extensions_PhptTestCase) {
$id = $id
->getName();
}
}
$this->tests[$id] = $status;
foreach ($data as $file => $lines) {
if (!$this->filter
->isFile($file)) {
continue;
}
foreach ($lines as $k => $v) {
if ($v == 1) {
$this->data[$file][$k][] = $id;
}
}
}
}