Merges the data from another instance of PHP_CodeCoverage.
PHP_CodeCoverage $that:
public function merge(PHP_CodeCoverage $that) {
foreach ($that->data as $file => $lines) {
if (!isset($this->data[$file])) {
if (!$this->filter
->isFiltered($file)) {
$this->data[$file] = $lines;
}
continue;
}
foreach ($lines as $line => $data) {
if ($data !== NULL) {
if (!isset($this->data[$file][$line])) {
$this->data[$file][$line] = $data;
}
else {
$this->data[$file][$line] = array_unique(array_merge($this->data[$file][$line], $data));
}
}
}
}
$this->tests = array_merge($this->tests, $that
->getTests());
}