Code Duplication    Length = 3-3 lines in 2 locations

src/relationships/ManyHaveManyRelationship.php 1 location

@@ 84-86 (lines=3) @@
81
            $this->options['foreign_key'] = $foreignModel->getDescription()->getPrimaryKey()[0];
82
        }
83
84
        if ($this->options['local_key'] == null) {
85
            $this->options['local_key'] = $this->setupPrimaryKey[0];
86
        }
87
88
        if (!isset($this->options['junction_local_key'])) {
89
            $this->options['junction_local_key'] = Text::singularize($this->setupTable).'_id';

src/relationships/HasManyRelationship.php 1 location

@@ 55-57 (lines=3) @@
52
        if ($this->options['foreign_key'] == null) {
53
            $this->options['foreign_key'] = Text::singularize($this->setupTable).'_id';
54
        }
55
        if ($this->options['local_key'] == null) {
56
            $this->options['local_key'] = $this->setupPrimaryKey[0];
57
        }
58
    }
59
}
60