GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 24-24 lines in 2 locations

src/Socket.php 2 locations

@@ 704-727 (lines=24) @@
701
     *
702
     * @return int Returns the number of bytes successfully written to the socket.
703
     */
704
    public function write($buffer, $length = null)
705
    {
706
        if (null === $length) {
707
            $length = strlen($buffer);
708
        }
709
710
        // make sure everything is written
711
        do {
712
            $return = @socket_write($this->resource, $buffer, $length);
713
714
            if (false !== $return && $return < $length) {
715
                $buffer = substr($buffer, $return);
716
                $length -= $return;
717
            } else {
718
                break;
719
            }
720
        } while (true);
721
722
        if ($return === false) {
723
            throw new SocketException($this->resource);
724
        }
725
726
        return $return;
727
    }
728
729
    /**
730
     * Sends data to a connected socket.
@@ 747-770 (lines=24) @@
744
     *
745
     * @return int Returns the number of bytes sent.
746
     */
747
    public function send($buffer, $flags = 0, $length = null)
748
    {
749
        if (null === $length) {
750
            $length = strlen($buffer);
751
        }
752
753
        // make sure everything is written
754
        do {
755
            $return = @socket_send($this->resource, $buffer, $length, $flags);
756
757
            if (false !== $return && $return < $length) {
758
                $buffer = substr($buffer, $return);
759
                $length -= $return;
760
            } else {
761
                break;
762
            }
763
        } while (true);
764
765
        if ($return === false) {
766
            throw new SocketException($this->resource);
767
        }
768
769
        return $return;
770
    }
771
772
    /**
773
     * Set the socket to blocking / non blocking.