Code Duplication    Length = 21-22 lines in 3 locations

app/Model/Message/QueueRelations.php 1 location

@@ 21-42 (lines=22) @@
18
 *
19
 * @property static $this
20
 */
21
trait QueueRelations
22
{
23
    /**
24
     * @return mixed
25
     */
26
    public function changeBy()
27
    {
28
        return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id');
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function model()
35
    {
36
        return $this->morphTo();
37
    }
38
39
    abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null);
40
41
    abstract public function morphTo($name = null, $type = null, $id = null);
42
}
43

app/Repository/Traits/Message/Queue/RelationTrait.php 1 location

@@ 21-41 (lines=21) @@
18
 *
19
 * @property static $this
20
 */
21
trait RelationTrait
22
{
23
    /**
24
     * @return mixed
25
     */
26
    public function changeBy()
27
    {
28
        return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id');
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function model()
35
    {
36
        return $this->morphTo();
37
    }
38
39
    abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null);
40
    abstract public function morphTo($name = null, $type = null, $id = null);
41
}
42

app/Repository/Traits/Relations/Message/Queue/Relations.php 1 location

@@ 21-42 (lines=22) @@
18
 *
19
 * @property static $this
20
 */
21
trait Relations
22
{
23
    /**
24
     * @return mixed
25
     */
26
    public function changeBy()
27
    {
28
        return $this->belongsTo('\Tinyissue\Model\User', 'change_by_id');
29
    }
30
31
    /**
32
     * @return mixed
33
     */
34
    public function model()
35
    {
36
        return $this->morphTo();
37
    }
38
39
    abstract public function belongsTo($related, $foreignKey = null, $otherKey = null, $relation = null);
40
41
    abstract public function morphTo($name = null, $type = null, $id = null);
42
}
43