Completed
Push — master ( ac54c1...40c2f7 )
by Freek
02:07 queued 12s
created

CampaignClick::campaignSend()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Spatie\EmailCampaigns\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\BelongsTo;
7
8 View Code Duplication
class CampaignClick extends Model
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    protected $guarded = [];
11
12
    public function campaignSend(): BelongsTo
13
    {
14
        return $this->belongsTo(CampaignSend::class, 'campaign_send_id');
15
    }
16
17
    public function link(): BelongsTo
18
    {
19
        return $this->belongsTo(CampaignLink::class, 'campaign_link_id');
20
    }
21
22
    public function subscriber(): BelongsTo
23
    {
24
        return $this->belongsTo(Subscriber::class, 'email_list_subscriber_id');
25
    }
26
}
27