Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Spreadsheet.php 2 locations

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