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

src/Document/DbRefRelationManager.php 3 locations

@@ 116-130 (lines=15) @@
113
114
        switch ($relationType) {
115
116
            case Document::RELATION_HAS_ONE:
117
                $foreignKey = $relation[2];
118
119
                $documentDbRef = self::generateDbRef($this->document);
120
121
                $document = $foreignCollection
122
                    ->find()
123
                    ->where($foreignKey.'.$id', $this->extractMongoIdFromDbRef($documentDbRef))
124
                    ->findOne();
125
126
                if ($document) {
127
                    $this->resolvedRelationIds[$relationName] = (string)$document->getId();
128
                }
129
130
                return $document;
131
132
            case Document::RELATION_BELONGS:
133
                $document = null;
@@ 132-144 (lines=13) @@
129
130
                return $document;
131
132
            case Document::RELATION_BELONGS:
133
                $document = null;
134
135
                $localKey = $relation[2];
136
137
                $dbRef = $this->document->get($localKey);
138
                $document = $foreignCollection->getDocument($this->extractMongoIdFromDbRef($dbRef));
139
140
                if ($document) {
141
                    $this->resolvedRelationIds[$relationName] = (string)$document->getId();
142
                }
143
144
                return $document;
145
146
            case Document::RELATION_HAS_MANY:
147
                $foreignKey = $relation[2];
@@ 146-159 (lines=14) @@
143
144
                return $document;
145
146
            case Document::RELATION_HAS_MANY:
147
                $foreignKey = $relation[2];
148
149
                $documentDbRef = self::generateDbRef($this->document);
150
                $documents = $foreignCollection
151
                    ->find()
152
                    ->where($foreignKey.'.$id', $this->extractMongoIdFromDbRef($documentDbRef))
153
                    ->findAll();
154
155
                foreach ($documents as $document) {
156
                    $this->resolvedRelationIds[$relationName][] = (string)$document->getId();
157
                }
158
159
                return $documents;
160
161
            case Document::RELATION_MANY_MANY:
162
                $isRelationListStoredInternally = isset($relation[3]) && $relation[3];