Factory::getClient()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 5
1
<?php
2
3
namespace CloudyCity\TencentMarketingSDK;
4
5
use CloudyCity\TencentMarketingSDK\Kernel\BaseClient;
6
7
class Factory
8
{
9
    /**
10
     * @param $resource
11
     * @param $advertiserId
12
     * @param $accessToken
13
     * @param string $responseType
14
     * @param bool   $check
15
     *
16
     * @throws \CloudyCity\TencentMarketingSDK\Kernel\Exceptions\InvalidResourceException
17
     *
18
     * @return BaseClient
19
     */
20
    public static function getClient($resource, $advertiserId, $accessToken, $responseType = 'array', $check = false)
21
    {
22
        return (new BaseClient($advertiserId, $accessToken, $responseType))->setResource($resource, $check);
23
    }
24
}
25