Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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