Code Duplication    Length = 6-6 lines in 4 locations

src/PhpSpreadsheet/Reader/Xlsx.php 4 locations

@@ 1191-1196 (lines=6) @@
1188
                            if ($xmlSheet && $xmlSheet->headerFooter && !$this->readDataOnly) {
1189
                                $docHeaderFooter = $docSheet->getHeaderFooter();
1190
1191
                                if (isset($xmlSheet->headerFooter['differentOddEven']) &&
1192
                                    self::boolean((string) $xmlSheet->headerFooter['differentOddEven'])) {
1193
                                    $docHeaderFooter->setDifferentOddEven(true);
1194
                                } else {
1195
                                    $docHeaderFooter->setDifferentOddEven(false);
1196
                                }
1197
                                if (isset($xmlSheet->headerFooter['differentFirst']) &&
1198
                                    self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) {
1199
                                    $docHeaderFooter->setDifferentFirst(true);
@@ 1197-1202 (lines=6) @@
1194
                                } else {
1195
                                    $docHeaderFooter->setDifferentOddEven(false);
1196
                                }
1197
                                if (isset($xmlSheet->headerFooter['differentFirst']) &&
1198
                                    self::boolean((string) $xmlSheet->headerFooter['differentFirst'])) {
1199
                                    $docHeaderFooter->setDifferentFirst(true);
1200
                                } else {
1201
                                    $docHeaderFooter->setDifferentFirst(false);
1202
                                }
1203
                                if (isset($xmlSheet->headerFooter['scaleWithDoc']) &&
1204
                                    !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) {
1205
                                    $docHeaderFooter->setScaleWithDocument(false);
@@ 1203-1208 (lines=6) @@
1200
                                } else {
1201
                                    $docHeaderFooter->setDifferentFirst(false);
1202
                                }
1203
                                if (isset($xmlSheet->headerFooter['scaleWithDoc']) &&
1204
                                    !self::boolean((string) $xmlSheet->headerFooter['scaleWithDoc'])) {
1205
                                    $docHeaderFooter->setScaleWithDocument(false);
1206
                                } else {
1207
                                    $docHeaderFooter->setScaleWithDocument(true);
1208
                                }
1209
                                if (isset($xmlSheet->headerFooter['alignWithMargins']) &&
1210
                                    !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) {
1211
                                    $docHeaderFooter->setAlignWithMargins(false);
@@ 1209-1214 (lines=6) @@
1206
                                } else {
1207
                                    $docHeaderFooter->setScaleWithDocument(true);
1208
                                }
1209
                                if (isset($xmlSheet->headerFooter['alignWithMargins']) &&
1210
                                    !self::boolean((string) $xmlSheet->headerFooter['alignWithMargins'])) {
1211
                                    $docHeaderFooter->setAlignWithMargins(false);
1212
                                } else {
1213
                                    $docHeaderFooter->setAlignWithMargins(true);
1214
                                }
1215
1216
                                $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader);
1217
                                $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter);