Code Duplication    Length = 11-11 lines in 2 locations

src/Suricate/DBObject.php 2 locations

@@ 309-319 (lines=11) @@
306
        return true;
307
    }
308
309
    private function loadRelationOneMany($name)
310
    {
311
        $target         = $this->relations[$name]['target'];
312
        $parentId       = $this->{$this->relations[$name]['source']};
313
        $parentIdField  = isset($this->relations[$name]['target_field']) ? $this->relations[$name]['target_field'] : null;
314
        $validate       = dataGet($this->relations[$name], 'validate', null);
315
        
316
        $this->relationValues[$name] = $target::loadForParentId($parentId, $parentIdField, $validate);
317
318
        return true;
319
    }
320
321
    private function loadRelationManyMany($name)
322
    {
@@ 321-331 (lines=11) @@
318
        return true;
319
    }
320
321
    private function loadRelationManyMany($name)
322
    {
323
        $pivot      = $this->relations[$name]['pivot'];
324
        $sourceType = $this->relations[$name]['source_type'];
325
        $target     = dataGet($this->relations[$name], 'target');
326
        $validate   = dataGet($this->relations[$name], 'validate', null);
327
328
        $this->relationValues[$name] = $pivot::loadFor($sourceType, $this->{$this->relations[$name]['source']}, $target, $validate);
329
        
330
        return true;
331
    }
332
333
    private function resetLoadedVariables()
334
    {