BaseInvoker   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 9
c 1
b 0
f 0
dl 0
loc 35
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResponseType() 0 3 1
A setResponseType() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace CloudyCity\TencentMarketingSDK\Kernel;
4
5
use CloudyCity\TencentMarketingSDK\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($advertiserId, $accessToken, $responseType = 'array')
38
    {
39
        $this->setAdvertiserId($advertiserId);
40
        $this->setAccessToken($accessToken);
41
        $this->setResponseType($responseType);
42
    }
43
}
44