Code Duplication    Length = 3-3 lines in 2 locations

src/relationships/HasManyRelationship.php 1 location

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

src/relationships/ManyHaveManyRelationship.php 1 location

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