BaseInvoker::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 4
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CloudyCity\UCMarketingSDK\Kernel;
4
5
use CloudyCity\UCMarketingSDK\Kernel\Traits\HasSubInvoker;
6
7
class BaseInvoker
8
{
9
    use HasSubInvoker;
10
11
    /**
12
     * @var array
13
     */
14
    protected $providers = [];
15
16
    /**
17
     * @var string
18
     */
19
    protected $responseType;
20
21
    /**
22
     * @return string
23
     */
24
    protected function getResponseType()
25
    {
26
        return $this->responseType;
27
    }
28
29
    /**
30
     * @param string $responseType
31
     */
32
    protected function setResponseType($responseType)
33
    {
34
        $this->responseType = $responseType;
35
    }
36
37
    public function __construct($username, $password, $token, $responseType = 'array')
38
    {
39
        $this->setUsername($username);
40
        $this->setPassword($password);
41
        $this->setToken($token);
42
        $this->setResponseType($responseType);
43
    }
44
}
45