Passed
Pull Request — master (#3)
by Gombos
01:57
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
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
    public function __construct(string $accountId, string $apiToken, string $userAgent)
22
    {
23
        parent::__construct($apiToken, $userAgent);
24
        $this->accountId = $accountId;
25
    }
26
27
    /**
28
     * @return Events
29
     */
30
    public function events(): Events
31
    {
32
        return new Events($this->getClient(), $this->accountId);
33
    }
34
35
    /**
36
     * @return Subscribers
37
     */
38
    public function subscribers(): Subscribers
39
    {
40
        return new Subscribers($this->getClient(), $this->accountId);
41
    }
42
43
    /**
44
     * @return Accounts
45
     */
46
    public function accounts(): Accounts
47
    {
48
        return new Accounts($this->getClient(), $this->accountId);
49
    }
50
}
51