Code Duplication    Length = 11-11 lines in 3 locations

src/BufferUnpacker.php 3 locations

@@ 611-621 (lines=11) @@
608
        return $num > 0x7fffffff ? $num - 0x100000000 : $num;
609
    }
610
611
    private function unpackInt64()
612
    {
613
        if (!isset($this->buffer[$this->offset + 7])) {
614
            throw new InsufficientDataException();
615
        }
616
617
        $num = \unpack('J', $this->buffer, $this->offset)[1];
618
        $this->offset += 8;
619
620
        return $num;
621
    }
622
623
    private function unpackFloat32()
624
    {
@@ 623-633 (lines=11) @@
620
        return $num;
621
    }
622
623
    private function unpackFloat32()
624
    {
625
        if (!isset($this->buffer[$this->offset + 3])) {
626
            throw new InsufficientDataException();
627
        }
628
629
        $num = \unpack('G', $this->buffer, $this->offset)[1];
630
        $this->offset += 4;
631
632
        return $num;
633
    }
634
635
    private function unpackFloat64()
636
    {
@@ 635-645 (lines=11) @@
632
        return $num;
633
    }
634
635
    private function unpackFloat64()
636
    {
637
        if (!isset($this->buffer[$this->offset + 7])) {
638
            throw new InsufficientDataException();
639
        }
640
641
        $num = \unpack('E', $this->buffer, $this->offset)[1];
642
        $this->offset += 8;
643
644
        return $num;
645
    }
646
647
    private function unpackArrayData($size)
648
    {