Code Duplication    Length = 5-7 lines in 2 locations

src/PhpSpreadsheet/Cell/Cell.php 2 locations

@@ 990-994 (lines=5) @@
987
                } elseif ($rowEnd === $row - 1) {
988
                    $rowEnd = $row;
989
                } else {
990
                    if ($rowStart == $rowEnd) {
991
                        $ranges[] = $hashedValue->col . $rowStart;
992
                    } else {
993
                        $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
994
                    }
995
996
                    $rowStart = $row;
997
                    $rowEnd = $row;
@@ 1001-1007 (lines=7) @@
998
                }
999
            }
1000
1001
            if ($rowStart !== null) {
1002
                if ($rowStart == $rowEnd) {
1003
                    $ranges[] = $hashedValue->col . $rowStart;
1004
                } else {
1005
                    $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
1006
                }
1007
            }
1008
1009
            foreach ($ranges as $range) {
1010
                $mergedCoordCollection[$range] = $hashedValue->value;