File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -392,19 +392,34 @@ public function merge(self $that): void
392392
393393 $ dif1 = \array_keys (\array_diff_key ($ this ->data [$ file ], $ that ->data [$ file ]));
394394 $ dif2 = \array_keys (\array_diff_key ($ that ->data [$ file ], $ this ->data [$ file ]));
395+ // if (!empty($dif1)) {
396+ // foreach ($dif1 as $key) {
397+ // $this->data[$file][$key][] = 'Unknown';
398+ // }
399+ // }
400+ // if (!empty($dif2)) {
401+ // foreach ($dif2 as $key) {
402+ // if (empty($that->data[$file][$key])) {
403+ // $this->data[$file][$key][] = 'Unknown';
404+ // }
405+ // }
406+ // }
407+
395408 if (!empty ($ dif1 )) {
396409 foreach ($ dif1 as $ key ) {
397- $ this ->data [$ file ][$ key ][] = 'Unknown ' ;
410+ if (empty ($ that ->data [$ file ][$ key ]) && empty ($ that ->data [$ file ][$ key ])) {
411+ unset($ this ->data [$ file ][$ key ]);
412+ }
398413 }
399414 }
400415 if (!empty ($ dif2 )) {
401416 foreach ($ dif2 as $ key ) {
402417 if (empty ($ that ->data [$ file ][$ key ])) {
403- $ this ->data [$ file ][$ key ][] = ' Unknown ' ;
418+ unset( $ that ->data [$ file ][$ key ]) ;
404419 }
405420 }
406421 }
407-
422+
408423 foreach ($ compareLineNumbers as $ line ) {
409424 $ thatPriority = $ this ->getLinePriority ($ that ->data [$ file ], $ line );
410425 $ thisPriority = $ this ->getLinePriority ($ this ->data [$ file ], $ line );
You can’t perform that action at this time.
0 commit comments