We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9910da8 commit 3577966Copy full SHA for 3577966
1 file changed
src/Data/ProcessedFunctionCoverageData.php
@@ -48,18 +48,20 @@ public function merge(self $data): self
48
{
49
$branches = $this->branches;
50
foreach($data->branches as $branchId => $branch) {
51
- if (isset($branches[$branchId])) {
52
- continue;
+ if (!isset($branches[$branchId])) {
+ $branches[$branchId] = $branch;
53
+ } else {
54
+ $branches[$branchId] = $branches[$branchId]->merge($branch);
55
}
- $branches[$branchId] = $branches[$branchId]->merge($branch);
56
57
58
$paths = $this->paths;
59
foreach($data->paths as $pathId => $path) {
- if (isset($paths[$pathId])) {
60
+ if (!isset($paths[$pathId])) {
61
+ $paths[$pathId] = $path;
62
63
+ $paths[$pathId] = $paths[$pathId]->merge($path);
64
- $paths[$pathId] = $paths[$pathId]->merge($path);
65
66
67
return new self(
0 commit comments