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

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