Code Duplication    Length = 11-11 lines in 2 locations

src/Notifynder/Models/Notification.php 2 locations

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