Segment   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscriptionsQuery() 0 4 1
A shouldSend() 0 4 1
1
<?php
2
3
namespace Spatie\EmailCampaigns\Support\Segments;
4
5
use Illuminate\Database\Eloquent\Builder;
6
use Spatie\EmailCampaigns\Models\Campaign;
7
use Spatie\EmailCampaigns\Models\Subscription;
8
9
abstract class Segment
10
{
11
    public function getSubscriptionsQuery(Campaign $campaign): Builder
12
    {
13
        return $campaign->emailList->subscriptions()->getQuery();
14
    }
15
16
    public function shouldSend(Subscription $subscription, Campaign $campaign): bool
0 ignored issues
show
Unused Code introduced by
The parameter $subscription is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $campaign is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
17
    {
18
        return true;
19
    }
20
}
21