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/Cursor.php 1 location

@@ 892-898 (lines=7) @@
889
            $result = $targetMongoCollection->batchInsert($documentList);
890
891
            // check result
892
            if(is_array($result)) {
893
                if($result['ok'] != 1) {
894
                    throw new Exception('Batch insert error: ' . $result['err']);
895
                }
896
            } elseif(!$result) {
897
                throw new Exception('Batch insert error');
898
            }
899
        }
900
901
        return $this;

src/Collection.php 2 locations

@@ 813-819 (lines=7) @@
810
        // If the w parameter is set to acknowledge the write,
811
        // returns an associative array with the status of the inserts ("ok")
812
        // and any error that may have occurred ("err").
813
        if(is_array($result)) {
814
            if($result['ok'] != 1) {
815
                throw new Exception('Batch insert error: ' . $result['err']);
816
            }
817
818
            return $this;
819
        }
820
821
        // Otherwise, returns TRUE if the batch insert was successfully sent,
822
        // FALSE otherwise.
@@ 886-891 (lines=6) @@
883
        );
884
885
        // if write concern acknowledged
886
        if(is_array($result)) {
887
            if($result['ok'] != 1) {
888
                throw new Exception(sprintf('Update error: %s: %s', $result['err'], $result['errmsg']));
889
            }
890
            return $this;
891
        }
892
893
        // if write concern unacknowledged
894
        if(!$result) {