Factory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
c 0
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 3 1
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