Completed
Push — master ( d9411c...c78c84 )
by CloudyCity
04:36
created

Factory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 3 1
1
<?php
2
3
4
namespace CloudyCity\TencentMarketingSDK;
5
6
use CloudyCity\TencentMarketingSDK\Kernel\BaseClient;
7
8
class Factory
9
{
10
    /**
11
     * @param $resource
12
     * @param $advertiserId
13
     * @param $accessToken
14
     * @param string $responseType
15
     * @param bool $check
16
     * @return BaseClient
17
     * @throws \CloudyCity\TencentMarketingSDK\Kernel\Exceptions\InvalidResourceException
18
     */
19
    public static function getClient($resource, $advertiserId, $accessToken, $responseType = 'array', $check = false)
20
    {
21
        return (new BaseClient($advertiserId, $accessToken, $responseType))->setResource($resource, $check);
22
    }
23
}
24