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

@@ 693-716 (lines=24) @@
690
     *
691
     * @return int Returns the number of bytes successfully written to the socket.
692
     */
693
    public function write($buffer, $length = null)
694
    {
695
        if (null === $length) {
696
            $length = strlen($buffer);
697
        }
698
699
        // make sure everything is written
700
        do {
701
            $return = @socket_write($this->resource, $buffer, $length);
702
703
            if (false !== $return && $return < $length) {
704
                $buffer = substr($buffer, $return);
705
                $length -= $return;
706
            } else {
707
                break;
708
            }
709
        } while (true);
710
711
        if ($return === false) {
712
            throw new SocketException($this->resource);
713
        }
714
715
        return $return;
716
    }
717
718
    /**
719
     * Sends data to a connected socket.
@@ 736-759 (lines=24) @@
733
     *
734
     * @return int Returns the number of bytes sent.
735
     */
736
    public function send($buffer, $flags = 0, $length = null)
737
    {
738
        if (null === $length) {
739
            $length = strlen($buffer);
740
        }
741
742
        // make sure everything is written
743
        do {
744
            $return = @socket_send($this->resource, $buffer, $length, $flags);
745
746
            if (false !== $return && $return < $length) {
747
                $buffer = substr($buffer, $return);
748
                $length -= $return;
749
            } else {
750
                break;
751
            }
752
        } while (true);
753
754
        if ($return === false) {
755
            throw new SocketException($this->resource);
756
        }
757
758
        return $return;
759
    }
760
761
    /**
762
     * Set the socket to blocking / non blocking.