Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2859-2861 (lines=3) @@
2856
        foreach ($rangeBlocks as &$rangeSet) {
2857
            $rangeBoundaries = Cell::getRangeBoundaries($rangeSet);
2858
2859
            if (Cell::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) {
2860
                $rangeBoundaries[0][0] = Cell::stringFromColumnIndex($maxCol);
2861
            }
2862
            if ($rangeBoundaries[0][1] > $maxRow) {
2863
                $rangeBoundaries[0][1] = $maxRow;
2864
            }
@@ 2865-2867 (lines=3) @@
2862
            if ($rangeBoundaries[0][1] > $maxRow) {
2863
                $rangeBoundaries[0][1] = $maxRow;
2864
            }
2865
            if (Cell::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) {
2866
                $rangeBoundaries[1][0] = Cell::stringFromColumnIndex($maxCol);
2867
            }
2868
            if ($rangeBoundaries[1][1] > $maxRow) {
2869
                $rangeBoundaries[1][1] = $maxRow;
2870
            }