Code Duplication    Length = 3-4 lines in 3 locations

src/relationships/HasManyRelationship.php 1 location

@@ 51-53 (lines=3) @@
48
49
    public function runSetup()
50
    {
51
        if($this->options['foreign_key'] == null) {
52
            $this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id';
53
        }
54
        if($this->options['local_key'] == null) {
55
            $this->options['local_key'] = $this->setupPrimaryKey[0];
56
        }

src/relationships/ManyHaveManyRelationship.php 2 locations

@@ 84-86 (lines=3) @@
81
                Text::singularize($this->setupTable) . '_id';
82
        }
83
84
        if (!isset($this->options['junction_foreign_key'])) {
85
            $this->options['junction_foreign_key'] = 
86
                Text::singularize($foreignModel->getDBStoreInformation()['table']) . '_id';
87
        }
88
    }
89
@@ 79-82 (lines=4) @@
76
            $this->options['local_key'] = $this->setupPrimaryKey[0];
77
        }
78
79
        if (!isset($this->options['junction_local_key'])) {
80
            $this->options['junction_local_key'] = 
81
                Text::singularize($this->setupTable) . '_id';
82
        }
83
84
        if (!isset($this->options['junction_foreign_key'])) {
85
            $this->options['junction_foreign_key'] =