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 = 6-7 lines in 3 locations

src/Collection.php 2 locations

@@ 829-835 (lines=7) @@
826
        // If the w parameter is set to acknowledge the write,
827
        // returns an associative array with the status of the inserts ("ok")
828
        // and any error that may have occurred ("err").
829
        if(is_array($result)) {
830
            if($result['ok'] != 1) {
831
                throw new Exception('Batch insert error: ' . $result['err']);
832
            }
833
834
            return $this;
835
        }
836
837
        // Otherwise, returns TRUE if the batch insert was successfully sent,
838
        // FALSE otherwise.
@@ 902-907 (lines=6) @@
899
        );
900
901
        // if write concern acknowledged
902
        if(is_array($result)) {
903
            if($result['ok'] != 1) {
904
                throw new Exception(sprintf('Update error: %s: %s', $result['err'], $result['errmsg']));
905
            }
906
            return $this;
907
        }
908
909
        // if write concern unacknowledged
910
        if(!$result) {

src/Cursor.php 1 location

@@ 935-941 (lines=7) @@
932
            $result = $targetMongoCollection->batchInsert($documentList);
933
934
            // check result
935
            if(is_array($result)) {
936
                if($result['ok'] != 1) {
937
                    throw new Exception('Batch insert error: ' . $result['err']);
938
                }
939
            } elseif(!$result) {
940
                throw new Exception('Batch insert error');
941
            }
942
        }
943
944
        return $this;