Passed
Pull Request — master (#3)
by Gombos
02:36
created

Drip   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

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