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

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