Code Duplication    Length = 5-7 lines in 2 locations

src/PhpSpreadsheet/Cell/Cell.php 2 locations

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