Code Duplication    Length = 13-15 lines in 4 locations

src/PhpSpreadsheet/Reader/Xls/Escher.php 4 locations

@@ 396-410 (lines=15) @@
393
    /**
394
     * Read OPT record. This record may occur within DggContainer record or SpContainer.
395
     */
396
    private function readOPT()
397
    {
398
        // offset: 0; size: 2; recVer and recInstance
399
400
        // bit: 4-15; mask: 0xFFF0; recInstance
401
        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;
402
403
        $length = Xls::getInt4d($this->data, $this->pos + 4);
404
        $recordData = substr($this->data, $this->pos + 8, $length);
405
406
        // move stream pointer to next record
407
        $this->pos += 8 + $length;
408
409
        $this->readOfficeArtRGFOPTE($recordData, $recInstance);
410
    }
411
412
    /**
413
     * Read TertiaryOPT record.
@@ 415-427 (lines=13) @@
412
    /**
413
     * Read TertiaryOPT record.
414
     */
415
    private function readTertiaryOPT()
416
    {
417
        // offset: 0; size: 2; recVer and recInstance
418
419
        // bit: 4-15; mask: 0xFFF0; recInstance
420
        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;
421
422
        $length = Xls::getInt4d($this->data, $this->pos + 4);
423
        $recordData = substr($this->data, $this->pos + 8, $length);
424
425
        // move stream pointer to next record
426
        $this->pos += 8 + $length;
427
    }
428
429
    /**
430
     * Read SplitMenuColors record.
@@ 534-546 (lines=13) @@
531
    /**
532
     * Read Sp record (Shape).
533
     */
534
    private function readSp()
535
    {
536
        // offset: 0; size: 2; recVer and recInstance
537
538
        // bit: 4-15; mask: 0xFFF0; recInstance
539
        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;
540
541
        $length = Xls::getInt4d($this->data, $this->pos + 4);
542
        $recordData = substr($this->data, $this->pos + 8, $length);
543
544
        // move stream pointer to next record
545
        $this->pos += 8 + $length;
546
    }
547
548
    /**
549
     * Read ClientTextbox record.
@@ 551-563 (lines=13) @@
548
    /**
549
     * Read ClientTextbox record.
550
     */
551
    private function readClientTextbox()
552
    {
553
        // offset: 0; size: 2; recVer and recInstance
554
555
        // bit: 4-15; mask: 0xFFF0; recInstance
556
        $recInstance = (0xFFF0 & Xls::getUInt2d($this->data, $this->pos)) >> 4;
557
558
        $length = Xls::getInt4d($this->data, $this->pos + 4);
559
        $recordData = substr($this->data, $this->pos + 8, $length);
560
561
        // move stream pointer to next record
562
        $this->pos += 8 + $length;
563
    }
564
565
    /**
566
     * Read ClientAnchor record. This record holds information about where the shape is anchored in worksheet.