Code Duplication    Length = 11-11 lines in 2 locations

src/Notifynder/Models/Notification.php 2 locations

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