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

src/Document/RelationManager.php 2 locations

@@ 209-216 (lines=8) @@
206
                $document->set($field, $this->document->getId())->save();
207
                break;
208
209
            case Document::RELATION_MANY_MANY:
210
                $isRelationListStoredInternally = isset($relation[3]) && $relation[3];
211
                if ($isRelationListStoredInternally) {
212
                    $this->document->push($field, $document->getId())->save();
213
                } else {
214
                    $document->push($field, $this->document->getId())->save();
215
                }
216
                break;
217
218
            default:
219
                throw new \Sokil\Mongo\Exception(
@@ 268-278 (lines=11) @@
265
                break;
266
267
268
            case Document::RELATION_MANY_MANY:
269
                if (!$document) {
270
                    throw new \Sokil\Mongo\Exception('Related document must be defined');
271
                }
272
                $isRelationListStoredInternally = isset($relation[3]) && $relation[3];
273
                if ($isRelationListStoredInternally) {
274
                    $this->document->pull($field, $document->getId())->save();
275
                } else {
276
                    $document->pull($field, $this->document->getId())->save();
277
                }
278
                break;
279
280
            default:
281
                throw new \Sokil\Mongo\Exception(