Code Duplication    Length = 10-10 lines in 2 locations

src/Notifynder/Models/Notification.php 2 locations

@@ 75-84 (lines=10) @@
72
    /**
73
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo|\Illuminate\Database\Eloquent\Relations\MorphTo
74
     */
75
    public function from()
76
    {
77
        // check if on the configurations file there is the option
78
        // polymorphic setted to true, if so Notifynder will work
79
        // polymorphic.
80
        if (config('notifynder.polymorphic') == false) {
81
            return $this->belongsTo(config('notifynder.model'), 'from_id');
82
        }
83
84
        return $this->morphTo();
85
    }
86
87
    /**
@@ 90-99 (lines=10) @@
87
    /**
88
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo|\Illuminate\Database\Eloquent\Relations\MorphTo
89
     */
90
    public function to()
91
    {
92
        // check if on the configurations file there is the option
93
        // polymorphic setted to true, if so Notifynder will work
94
        // polymorphic.
95
        if (config('notifynder.polymorphic') == false) {
96
            return $this->belongsTo(config('notifynder.model'), 'to_id');
97
        }
98
99
        return $this->morphTo();
100
    }
101
102
    /**