Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2776-2778 (lines=3) @@
2773
        foreach ($rangeBlocks as &$rangeSet) {
2774
            $rangeBoundaries = Cell::getRangeBoundaries($rangeSet);
2775
2776
            if (Cell::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) {
2777
                $rangeBoundaries[0][0] = Cell::stringFromColumnIndex($maxCol);
2778
            }
2779
            if ($rangeBoundaries[0][1] > $maxRow) {
2780
                $rangeBoundaries[0][1] = $maxRow;
2781
            }
@@ 2782-2784 (lines=3) @@
2779
            if ($rangeBoundaries[0][1] > $maxRow) {
2780
                $rangeBoundaries[0][1] = $maxRow;
2781
            }
2782
            if (Cell::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) {
2783
                $rangeBoundaries[1][0] = Cell::stringFromColumnIndex($maxCol);
2784
            }
2785
            if ($rangeBoundaries[1][1] > $maxRow) {
2786
                $rangeBoundaries[1][1] = $maxRow;
2787
            }