Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2875-2877 (lines=3) @@
2872
        foreach ($rangeBlocks as &$rangeSet) {
2873
            $rangeBoundaries = Cell::getRangeBoundaries($rangeSet);
2874
2875
            if (Cell::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) {
2876
                $rangeBoundaries[0][0] = Cell::stringFromColumnIndex($maxCol);
2877
            }
2878
            if ($rangeBoundaries[0][1] > $maxRow) {
2879
                $rangeBoundaries[0][1] = $maxRow;
2880
            }
@@ 2881-2883 (lines=3) @@
2878
            if ($rangeBoundaries[0][1] > $maxRow) {
2879
                $rangeBoundaries[0][1] = $maxRow;
2880
            }
2881
            if (Cell::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) {
2882
                $rangeBoundaries[1][0] = Cell::stringFromColumnIndex($maxCol);
2883
            }
2884
            if ($rangeBoundaries[1][1] > $maxRow) {
2885
                $rangeBoundaries[1][1] = $maxRow;
2886
            }