Code Duplication    Length = 18-18 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 487-504 (lines=18) @@
484
        $this->sheets = [];
485
486
        // Parse Workbook Global Substream
487
        while ($this->pos < $this->dataSize) {
488
            $code = self::getInt2d($this->data, $this->pos);
489
490
            switch ($code) {
491
                case self::XLS_TYPE_BOF:
492
                    $this->readBof();
493
                    break;
494
                case self::XLS_TYPE_SHEET:
495
                    $this->readSheet();
496
                    break;
497
                case self::XLS_TYPE_EOF:
498
                    $this->readDefault();
499
                    break 2;
500
                default:
501
                    $this->readDefault();
502
                    break;
503
            }
504
        }
505
506
        foreach ($this->sheets as $sheet) {
507
            if ($sheet['sheetType'] != 0x00) {
@@ 542-559 (lines=18) @@
539
        $this->sheets = [];
540
541
        // Parse Workbook Global Substream
542
        while ($this->pos < $this->dataSize) {
543
            $code = self::getInt2d($this->data, $this->pos);
544
545
            switch ($code) {
546
                case self::XLS_TYPE_BOF:
547
                    $this->readBof();
548
                    break;
549
                case self::XLS_TYPE_SHEET:
550
                    $this->readSheet();
551
                    break;
552
                case self::XLS_TYPE_EOF:
553
                    $this->readDefault();
554
                    break 2;
555
                default:
556
                    $this->readDefault();
557
                    break;
558
            }
559
        }
560
561
        // Parse the individual sheets
562
        foreach ($this->sheets as $sheet) {