Code Duplication    Length = 5-7 lines in 2 locations

src/PhpSpreadsheet/Cell/Coordinate.php 2 locations

@@ 436-440 (lines=5) @@
433
                } elseif ($rowEnd === $row - 1) {
434
                    $rowEnd = $row;
435
                } else {
436
                    if ($rowStart == $rowEnd) {
437
                        $ranges[] = $hashedValue->col . $rowStart;
438
                    } else {
439
                        $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
440
                    }
441
442
                    $rowStart = $row;
443
                    $rowEnd = $row;
@@ 447-453 (lines=7) @@
444
                }
445
            }
446
447
            if ($rowStart !== null) {
448
                if ($rowStart == $rowEnd) {
449
                    $ranges[] = $hashedValue->col . $rowStart;
450
                } else {
451
                    $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
452
                }
453
            }
454
455
            foreach ($ranges as $range) {
456
                $mergedCoordCollection[$range] = $hashedValue->value;