Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Spreadsheet.php 2 locations

@@ 1072-1075 (lines=4) @@
1069
1070
        foreach ($this->getWorksheetIterator() as $sheet) {
1071
            // from cells
1072
            foreach ($sheet->getCellCollection(false) as $cellID) {
1073
                $cell = $sheet->getCell($cellID);
1074
                ++$countReferencesCellXf[$cell->getXfIndex()];
1075
            }
1076
1077
            // from row dimensions
1078
            foreach ($sheet->getRowDimensions() as $rowDimension) {
@@ 1116-1119 (lines=4) @@
1113
        // update the xfIndex for all cells, row dimensions, column dimensions
1114
        foreach ($this->getWorksheetIterator() as $sheet) {
1115
            // for all cells
1116
            foreach ($sheet->getCellCollection(false) as $cellID) {
1117
                $cell = $sheet->getCell($cellID);
1118
                $cell->setXfIndex($map[$cell->getXfIndex()]);
1119
            }
1120
1121
            // for all row dimensions
1122
            foreach ($sheet->getRowDimensions() as $rowDimension) {