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

Drip::accounts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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