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

src/Document/RelationManager.php 2 locations

@@ 70-84 (lines=15) @@
67
        }
68
69
        switch ($relationType) {
70
            case Document::RELATION_HAS_ONE:
71
                $localKey = isset($relation['localKey']) ? $relation['localKey'] : '_id';
72
                $foreignKey = $relation[2];
73
74
                $document = $foreignCollection
75
                    ->find()
76
                    ->where($foreignKey, $this->document->get($localKey))
77
                    ->findOne();
78
79
                if ($document) {
80
                    $this->resolvedRelationIds[$relationName] = (string) $document->getId();
81
                }
82
83
                return $document;
84
85
            case Document::RELATION_BELONGS:
86
                $localKey = $relation[2];
87
                $foreignKey = isset($relation['foreignKey']) ? $relation['foreignKey'] : '_id';
@@ 104-117 (lines=14) @@
101
102
                return $document;
103
104
            case Document::RELATION_HAS_MANY:
105
                $localKey = isset($relation['localKey']) ? $relation['localKey'] : '_id';
106
                $foreignKey = $relation[2];
107
108
                $documents = $foreignCollection
109
                    ->find()
110
                    ->where($foreignKey, $this->document->get($localKey))
111
                    ->findAll();
112
113
                foreach ($documents as $document) {
114
                    $this->resolvedRelationIds[$relationName][] = (string) $document->getId();
115
                }
116
117
                return $documents;
118
119
            case Document::RELATION_MANY_MANY:
120
                $isRelationListStoredInternally = isset($relation[3]) && $relation[3];