Code Duplication    Length = 5-6 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 1973-1977 (lines=5) @@
1970
            // offset: 12; size: 1; character set
1971
            // offset: 13; size: 1; not used
1972
            // offset: 14; size: var; font name
1973
            if ($this->version == self::XLS_BIFF8) {
1974
                $string = self::readUnicodeStringShort(substr($recordData, 14));
1975
            } else {
1976
                $string = $this->readByteStringShort(substr($recordData, 14));
1977
            }
1978
            $objFont->setName($string['value']);
1979
1980
            $this->objFonts[] = $objFont;
@@ 2009-2014 (lines=6) @@
2006
        if (!$this->readDataOnly) {
2007
            $indexCode = self::getInt2d($recordData, 0);
2008
2009
            if ($this->version == self::XLS_BIFF8) {
2010
                $string = self::readUnicodeStringLong(substr($recordData, 2));
2011
            } else {
2012
                // BIFF7
2013
                $string = $this->readByteStringShort(substr($recordData, 2));
2014
            }
2015
2016
            $formatString = $string['value'];
2017
            $this->formats[$indexCode] = $formatString;