Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel5.php 1 location

@@ 7405-7418 (lines=14) @@
7402
     * @param int $pos
7403
     * @return int
7404
     */
7405
    public static function getInt4d($data, $pos)
7406
    {
7407
        // FIX: represent numbers correctly on 64-bit system
7408
        // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334
7409
        // Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
7410
        $_or_24 = ord($data[$pos + 3]);
7411
        if ($_or_24 >= 128) {
7412
            // negative number
7413
            $_ord_24 = -abs((256 - $_or_24) << 24);
7414
        } else {
7415
            $_ord_24 = ($_or_24 & 127) << 24;
7416
        }
7417
7418
        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;
7419
    }
7420
7421
    private function parseRichText($is = '')

src/PhpSpreadsheet/Shared/OLERead.php 1 location

@@ 303-316 (lines=14) @@
300
     * @param int $pos
301
     * @return int
302
     */
303
    private static function getInt4d($data, $pos)
304
    {
305
        // FIX: represent numbers correctly on 64-bit system
306
        // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334
307
        // Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
308
        $_or_24 = ord($data[$pos + 3]);
309
        if ($_or_24 >= 128) {
310
            // negative number
311
            $_ord_24 = -abs((256 - $_or_24) << 24);
312
        } else {
313
            $_ord_24 = ($_or_24 & 127) << 24;
314
        }
315
316
        return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24;
317
    }
318
}
319