Code Duplication    Length = 11-13 lines in 3 locations

src/BufferUnpacker.php 3 locations

@@ 324-334 (lines=11) @@
321
        return $num[1];
322
    }
323
324
    private function unpackI64()
325
    {
326
        $this->ensureLength(8);
327
328
        $num = \substr($this->buffer, $this->offset, 8);
329
        $this->offset += 8;
330
331
        $set = \unpack('N2', $num);
332
333
        return $set[1] << 32 | $set[2];
334
    }
335
336
    private function unpackFloat()
337
    {
@@ 255-265 (lines=11) @@
252
        return $num[1];
253
    }
254
255
    private function unpackU32()
256
    {
257
        $this->ensureLength(4);
258
259
        $num = \substr($this->buffer, $this->offset, 4);
260
        $this->offset += 4;
261
262
        $num = \unpack('N', $num);
263
264
        return $num[1];
265
    }
266
267
    private function unpackU64()
268
    {
@@ 286-298 (lines=13) @@
283
        return ($value < 0) ? $this->handleIntOverflow($value) : $value;
284
    }
285
286
    private function unpackI8()
287
    {
288
        $this->ensureLength(1);
289
290
        $num = \ord($this->buffer[$this->offset]);
291
        $this->offset += 1;
292
293
        if ($num & 128) {
294
            return $num - 256;
295
        }
296
297
        return $num;
298
    }
299
300
    private function unpackI16()
301
    {