Code Duplication    Length = 5-7 lines in 2 locations

src/PhpSpreadsheet/Cell.php 2 locations

@@ 1004-1008 (lines=5) @@
1001
                } elseif ($rowEnd === $row - 1) {
1002
                    $rowEnd = $row;
1003
                } else {
1004
                    if ($rowStart == $rowEnd) {
1005
                        $ranges[] = $hashedValue->col . $rowStart;
1006
                    } else {
1007
                        $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
1008
                    }
1009
1010
                    $rowStart = $row;
1011
                    $rowEnd = $row;
@@ 1015-1021 (lines=7) @@
1012
                }
1013
            }
1014
1015
            if ($rowStart !== null) {
1016
                if ($rowStart == $rowEnd) {
1017
                    $ranges[] = $hashedValue->col . $rowStart;
1018
                } else {
1019
                    $ranges[] = $hashedValue->col . $rowStart . ':' . $hashedValue->col . $rowEnd;
1020
                }
1021
            }
1022
1023
            foreach ($ranges as $range) {
1024
                $mergedCoordCollection[$range] = $hashedValue->value;