Code Duplication    Length = 14-14 lines in 2 locations

src/RelationManager.php 2 locations

@@ 102-115 (lines=14) @@
99
     *
100
     * @return \Illuminate\Database\Eloquent\Relations\MorphToMany
101
     */
102
    public function morphed_by_many(
103
        Model $model,
104
        $relationName,
105
        $related,
106
        $name,
107
        $table = null,
108
        $foreignPivotKey = null,
109
        $relatedPivotKey = null,
110
        $parentKey = null,
111
        $relatedKey = null
112
    ) {
113
        return new AbstractRelation(['morphedByMany', $model, $relationName, [$related, $name, $table, $foreignPivotKey,
114
            $relatedPivotKey, $parentKey, $relatedKey, $relationName, ]]);
115
    }
116
117
    /**
118
     * @param string $relationName
@@ 174-187 (lines=14) @@
171
     * @param  string  $relatedKey
172
     * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
173
     */
174
    public function belongs_to_many(
175
        Model $model,
176
        $relationName,
177
        $related,
178
        $table = null,
179
        $foreignPivotKey = null,
180
        $relatedPivotKey = null,
181
        $parentKey = null,
182
        $relatedKey = null
183
    ) {
184
        $params = [$related, $table, $foreignPivotKey, $relatedPivotKey, $parentKey, $relatedKey, $relationName];
185
186
        return new AbstractRelation(['belongsToMany', $model, $relationName, $params]);
187
    }
188
189
    /**
190
     * Define a polymorphic many-to-many relationship.