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

Factory::getClient()   A

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
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