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

src/Collection.php 1 location

@@ 872-878 (lines=7) @@
869
        $result = $this->getMongoCollection()->insert($document);
870
871
        // if write concern acknowledged
872
        if(is_array($result)) {
873
            if($result['ok'] != 1) {
874
                throw new Exception('Insert error: ' . $result['err'] . ': ' . $result['errmsg']);
875
            }
876
877
            return $this;
878
        }
879
880
        // if write concern unacknowledged
881
        if(!$result) {

src/GridFS.php 1 location

@@ 119-121 (lines=3) @@
116
                $result = $this->getMongoCollection()->delete($id);
117
            }
118
        }
119
        if($result['ok'] !== (double) 1) {
120
            throw new Exception('Error deleting file: ' . $result['err'] . ': ' . $result['errmsg']);
121
        }
122
        
123
        return $this;
124
    }