Code Duplication    Length = 11-11 lines in 2 locations

src/Notifynder/Models/Notification.php 2 locations

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