Completed
Push — master ( f2347c...1e5bea )
by Thijs
19s queued 11s
created

Contact   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A subscribe() 0 4 1
A unsubscribe() 0 4 1
1
<?php
2
3
namespace TestMonitor\ActiveCampaign\Resources;
4
5
class Contact extends Resource
6
{
7
    /**
8
     * The id of the contact.
9
     *
10
     * @var int
11
     */
12
    public $id;
13
14
    /**
15
     * @var string
16
     */
17
    public $firstName;
18
19
    /**
20
     * @var string
21
     */
22
    public $lastName;
23
24
    /**
25
     * @var string
26
     */
27
    public $email;
28
29
    /**
30
     * @var int
31
     */
32
    public $orgid;
33
34
    public function subscribe($list)
35
    {
36
        $this->activeCampaign->updateListStatus($list, $this->id, true);
37
    }
38
39
    public function unsubscribe($list)
40
    {
41
        $this->activeCampaign->updateListStatus($list, $this->id, false);
42
    }
43
}
44