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

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