Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Worksheet.php 2 locations

@@ 2845-2847 (lines=3) @@
2842
        foreach ($rangeBlocks as &$rangeSet) {
2843
            $rangeBoundaries = Cell::getRangeBoundaries($rangeSet);
2844
2845
            if (Cell::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) {
2846
                $rangeBoundaries[0][0] = Cell::stringFromColumnIndex($maxCol);
2847
            }
2848
            if ($rangeBoundaries[0][1] > $maxRow) {
2849
                $rangeBoundaries[0][1] = $maxRow;
2850
            }
@@ 2851-2853 (lines=3) @@
2848
            if ($rangeBoundaries[0][1] > $maxRow) {
2849
                $rangeBoundaries[0][1] = $maxRow;
2850
            }
2851
            if (Cell::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) {
2852
                $rangeBoundaries[1][0] = Cell::stringFromColumnIndex($maxCol);
2853
            }
2854
            if ($rangeBoundaries[1][1] > $maxRow) {
2855
                $rangeBoundaries[1][1] = $maxRow;
2856
            }