Code Duplication    Length = 13-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 7180-7192 (lines=13) @@
7177
     *
7178
     * @return array
7179
     */
7180
    private function readByteStringShort($subData)
7181
    {
7182
        // offset: 0; size: 1; length of the string (character count)
7183
        $ln = ord($subData[0]);
7184
7185
        // offset: 1: size: var; character array (8-bit characters)
7186
        $value = $this->decodeCodepage(substr($subData, 1, $ln));
7187
7188
        return [
7189
            'value' => $value,
7190
            'size' => 1 + $ln, // size in bytes of data structure
7191
        ];
7192
    }
7193
7194
    /**
7195
     * Read byte string (16-bit string length)
@@ 7202-7215 (lines=14) @@
7199
     *
7200
     * @return array
7201
     */
7202
    private function readByteStringLong($subData)
7203
    {
7204
        // offset: 0; size: 2; length of the string (character count)
7205
        $ln = self::getInt2d($subData, 0);
7206
7207
        // offset: 2: size: var; character array (8-bit characters)
7208
        $value = $this->decodeCodepage(substr($subData, 2));
7209
7210
        //return $string;
7211
        return [
7212
            'value' => $value,
7213
            'size' => 2 + $ln, // size in bytes of data structure
7214
        ];
7215
    }
7216
7217
    /**
7218
     * Extracts an Excel Unicode short string (8-bit string length)