Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7689-7702 (lines=14) @@
7686
     *
7687
     * @return array
7688
     */
7689
    private static function readUnicodeStringShort($subData)
7690
    {
7691
        $value = '';
7692
7693
        // offset: 0: size: 1; length of the string (character count)
7694
        $characterCount = ord($subData[0]);
7695
7696
        $string = self::readUnicodeString(substr($subData, 1), $characterCount);
7697
7698
        // add 1 for the string length
7699
        $string['size'] += 1;
7700
7701
        return $string;
7702
    }
7703
7704
    /**
7705
     * Extracts an Excel Unicode long string (16-bit string length)
@@ 7713-7726 (lines=14) @@
7710
     *
7711
     * @return array
7712
     */
7713
    private static function readUnicodeStringLong($subData)
7714
    {
7715
        $value = '';
7716
7717
        // offset: 0: size: 2; length of the string (character count)
7718
        $characterCount = self::getUInt2d($subData, 0);
7719
7720
        $string = self::readUnicodeString(substr($subData, 2), $characterCount);
7721
7722
        // add 2 for the string length
7723
        $string['size'] += 2;
7724
7725
        return $string;
7726
    }
7727
7728
    /**
7729
     * Read Unicode string with no string length field, but with known character count