Code Duplication    Length = 7-7 lines in 2 locations

src/Models/MetadataTrait.php 2 locations

@@ 193-199 (lines=7) @@
190
        $resourceType = $entityTypes[$thisClass];
191
        // if $r is in $combined keys, then its in keyspaces of both $entityTypes and $resourceSets
192
        $combinedKeys = array_intersect(array_keys($entityTypes), array_keys($resourceSets));
193
        foreach ($rel["HasOne"] as $n => $r) {
194
            $r = trim($r, '\\');
195
            if (in_array($r, $combinedKeys)) {
196
                $targResourceSet = $resourceSets[$r];
197
                $metadata->addResourceReferenceProperty($resourceType, $n, $targResourceSet);
198
            }
199
        }
200
        foreach ($rel["HasMany"] as $n => $r) {
201
            $r = trim($r, '\\');
202
            if (in_array($r, $combinedKeys)) {
@@ 200-206 (lines=7) @@
197
                $metadata->addResourceReferenceProperty($resourceType, $n, $targResourceSet);
198
            }
199
        }
200
        foreach ($rel["HasMany"] as $n => $r) {
201
            $r = trim($r, '\\');
202
            if (in_array($r, $combinedKeys)) {
203
                $targResourceSet = $resourceSets[$r];
204
                $metadata->addResourceSetReferenceProperty($resourceType, $n, $targResourceSet);
205
            }
206
        }
207
        return $rel;
208
    }
209