Code Duplication    Length = 11-11 lines in 2 locations

src/Notifynder/Models/Notification.php 2 locations

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