Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7216-7228 (lines=13) @@
7213
     *
7214
     * @return array
7215
     */
7216
    private function readByteStringShort($subData)
7217
    {
7218
        // offset: 0; size: 1; length of the string (character count)
7219
        $ln = ord($subData[0]);
7220
7221
        // offset: 1: size: var; character array (8-bit characters)
7222
        $value = $this->decodeCodepage(substr($subData, 1, $ln));
7223
7224
        return [
7225
            'value' => $value,
7226
            'size' => 1 + $ln, // size in bytes of data structure
7227
        ];
7228
    }
7229
7230
    /**
7231
     * Read byte string (16-bit string length)
@@ 7238-7251 (lines=14) @@
7235
     *
7236
     * @return array
7237
     */
7238
    private function readByteStringLong($subData)
7239
    {
7240
        // offset: 0; size: 2; length of the string (character count)
7241
        $ln = self::getInt2d($subData, 0);
7242
7243
        // offset: 2: size: var; character array (8-bit characters)
7244
        $value = $this->decodeCodepage(substr($subData, 2));
7245
7246
        //return $string;
7247
        return [
7248
            'value' => $value,
7249
            'size' => 2 + $ln, // size in bytes of data structure
7250
        ];
7251
    }
7252
7253
    /**
7254
     * Extracts an Excel Unicode short string (8-bit string length)