Passed
Push — master ( 8f7834...bd0d29 )
by Gombos
01:07
created

Drip   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 40
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A events() 0 3 1
A subscribers() 0 3 1
A accounts() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace Glorand\Drip;
4
5
use Glorand\Drip\Api\Accounts;
6
use Glorand\Drip\Api\Events;
7
use Glorand\Drip\Api\Subscribers;
8
9
class Drip extends ClientManager
10
{
11
    /** @var string */
12
    protected $accountId;
13
14
    /**
15
     * Drip constructor.
16
     *
17
     * @param string $accountId
18
     * @param string $apiToken
19
     * @param string $userAgent
20
     */
21 6
    public function __construct(string $accountId, string $apiToken, string $userAgent)
22
    {
23 6
        parent::__construct($apiToken, $userAgent);
24 6
        $this->accountId = $accountId;
25 6
    }
26
27
    /**
28
     * @return Events
29
     */
30 3
    public function events(): Events
31
    {
32 3
        return new Events($this->getClient(), $this->accountId);
33
    }
34
35
    /**
36
     * @return Subscribers
37
     */
38 2
    public function subscribers(): Subscribers
39
    {
40 2
        return new Subscribers($this->getClient(), $this->accountId);
41
    }
42
43
    /**
44
     * @return Accounts
45
     */
46 2
    public function accounts(): Accounts
47
    {
48 2
        return new Accounts($this->getClient(), $this->accountId);
49
    }
50
}
51