Code Duplication    Length = 11-11 lines in 2 locations

src/BufferUnpacker.php 2 locations

@@ 300-310 (lines=11) @@
297
        return $num;
298
    }
299
300
    private function unpackI16()
301
    {
302
        $this->ensureLength(2);
303
304
        $num = $this->buffer[$this->offset].$this->buffer[$this->offset + 1];
305
        $this->offset += 2;
306
307
        $num = \unpack('s', \strrev($num));
308
309
        return $num[1];
310
    }
311
312
    private function unpackI32()
313
    {
@@ 243-253 (lines=11) @@
240
        return \ord($num);
241
    }
242
243
    private function unpackU16()
244
    {
245
        $this->ensureLength(2);
246
247
        $num = $this->buffer[$this->offset].$this->buffer[$this->offset + 1];
248
        $this->offset += 2;
249
250
        $num = \unpack('n', $num);
251
252
        return $num[1];
253
    }
254
255
    private function unpackU32()
256
    {