File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -48,18 +48,20 @@ public function merge(self $data): self
4848 {
4949 $ branches = $ this ->branches ;
5050 foreach ($ data ->branches as $ branchId => $ branch ) {
51- if (isset ($ branches [$ branchId ])) {
52- continue ;
51+ if (!isset ($ branches [$ branchId ])) {
52+ $ branches [$ branchId ] = $ branch ;
53+ } else {
54+ $ branches [$ branchId ] = $ branches [$ branchId ]->merge ($ branch );
5355 }
54- $ branches [$ branchId ] = $ branches [$ branchId ]->merge ($ branch );
5556 }
5657
5758 $ paths = $ this ->paths ;
5859 foreach ($ data ->paths as $ pathId => $ path ) {
59- if (isset ($ paths [$ pathId ])) {
60- continue ;
60+ if (!isset ($ paths [$ pathId ])) {
61+ $ paths [$ pathId ] = $ path ;
62+ } else {
63+ $ paths [$ pathId ] = $ paths [$ pathId ]->merge ($ path );
6164 }
62- $ paths [$ pathId ] = $ paths [$ pathId ]->merge ($ path );
6365 }
6466
6567 return new self (
You can’t perform that action at this time.
0 commit comments