Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7633-7645 (lines=13) @@
7630
     *
7631
     * @return array
7632
     */
7633
    private function readByteStringShort($subData)
7634
    {
7635
        // offset: 0; size: 1; length of the string (character count)
7636
        $ln = ord($subData[0]);
7637
7638
        // offset: 1: size: var; character array (8-bit characters)
7639
        $value = $this->decodeCodepage(substr($subData, 1, $ln));
7640
7641
        return [
7642
            'value' => $value,
7643
            'size' => 1 + $ln, // size in bytes of data structure
7644
        ];
7645
    }
7646
7647
    /**
7648
     * Read byte string (16-bit string length)
@@ 7655-7668 (lines=14) @@
7652
     *
7653
     * @return array
7654
     */
7655
    private function readByteStringLong($subData)
7656
    {
7657
        // offset: 0; size: 2; length of the string (character count)
7658
        $ln = self::getUInt2d($subData, 0);
7659
7660
        // offset: 2: size: var; character array (8-bit characters)
7661
        $value = $this->decodeCodepage(substr($subData, 2));
7662
7663
        //return $string;
7664
        return [
7665
            'value' => $value,
7666
            'size' => 2 + $ln, // size in bytes of data structure
7667
        ];
7668
    }
7669
7670
    /**
7671
     * Extracts an Excel Unicode short string (8-bit string length)