Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7192-7204 (lines=13) @@
7189
     *
7190
     * @return array
7191
     */
7192
    private function readByteStringShort($subData)
7193
    {
7194
        // offset: 0; size: 1; length of the string (character count)
7195
        $ln = ord($subData[0]);
7196
7197
        // offset: 1: size: var; character array (8-bit characters)
7198
        $value = $this->decodeCodepage(substr($subData, 1, $ln));
7199
7200
        return [
7201
            'value' => $value,
7202
            'size' => 1 + $ln, // size in bytes of data structure
7203
        ];
7204
    }
7205
7206
    /**
7207
     * Read byte string (16-bit string length)
@@ 7214-7227 (lines=14) @@
7211
     *
7212
     * @return array
7213
     */
7214
    private function readByteStringLong($subData)
7215
    {
7216
        // offset: 0; size: 2; length of the string (character count)
7217
        $ln = self::getInt2d($subData, 0);
7218
7219
        // offset: 2: size: var; character array (8-bit characters)
7220
        $value = $this->decodeCodepage(substr($subData, 2));
7221
7222
        //return $string;
7223
        return [
7224
            'value' => $value,
7225
            'size' => 2 + $ln, // size in bytes of data structure
7226
        ];
7227
    }
7228
7229
    /**
7230
     * Extracts an Excel Unicode short string (8-bit string length)