Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7643-7655 (lines=13) @@
7640
     *
7641
     * @return array
7642
     */
7643
    private function readByteStringShort($subData)
7644
    {
7645
        // offset: 0; size: 1; length of the string (character count)
7646
        $ln = ord($subData[0]);
7647
7648
        // offset: 1: size: var; character array (8-bit characters)
7649
        $value = $this->decodeCodepage(substr($subData, 1, $ln));
7650
7651
        return [
7652
            'value' => $value,
7653
            'size' => 1 + $ln, // size in bytes of data structure
7654
        ];
7655
    }
7656
7657
    /**
7658
     * Read byte string (16-bit string length)
@@ 7665-7678 (lines=14) @@
7662
     *
7663
     * @return array
7664
     */
7665
    private function readByteStringLong($subData)
7666
    {
7667
        // offset: 0; size: 2; length of the string (character count)
7668
        $ln = self::getUInt2d($subData, 0);
7669
7670
        // offset: 2: size: var; character array (8-bit characters)
7671
        $value = $this->decodeCodepage(substr($subData, 2));
7672
7673
        //return $string;
7674
        return [
7675
            'value' => $value,
7676
            'size' => 2 + $ln, // size in bytes of data structure
7677
        ];
7678
    }
7679
7680
    /**
7681
     * Extracts an Excel Unicode short string (8-bit string length)