Code Duplication    Length = 4-4 lines in 2 locations

src/PhpSpreadsheet/Spreadsheet.php 2 locations

@@ 1117-1120 (lines=4) @@
1114
1115
        foreach ($this->getWorksheetIterator() as $sheet) {
1116
            // from cells
1117
            foreach ($sheet->getCoordinates(false) as $coordinate) {
1118
                $cell = $sheet->getCell($coordinate);
1119
                ++$countReferencesCellXf[$cell->getXfIndex()];
1120
            }
1121
1122
            // from row dimensions
1123
            foreach ($sheet->getRowDimensions() as $rowDimension) {
@@ 1161-1164 (lines=4) @@
1158
        // update the xfIndex for all cells, row dimensions, column dimensions
1159
        foreach ($this->getWorksheetIterator() as $sheet) {
1160
            // for all cells
1161
            foreach ($sheet->getCoordinates(false) as $coordinate) {
1162
                $cell = $sheet->getCell($coordinate);
1163
                $cell->setXfIndex($map[$cell->getXfIndex()]);
1164
            }
1165
1166
            // for all row dimensions
1167
            foreach ($sheet->getRowDimensions() as $rowDimension) {