Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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