Code Duplication    Length = 3-3 lines in 2 locations

src/relationships/HasManyRelationship.php 1 location

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

src/relationships/ManyHaveManyRelationship.php 1 location

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