Conf   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 0

Test Coverage

Coverage 47.06%

Importance

Changes 0
Metric Value
dl 0
loc 48
ccs 8
cts 17
cp 0.4706
rs 10
c 0
b 0
f 0
wmc 7
lcom 3
cbo 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A setAppId() 0 4 1
A setSecretId() 0 4 1
A setSecretKey() 0 4 1
A getAppId() 0 4 1
A getSecretId() 0 4 1
A getSecretKey() 0 4 1
A getUA() 0 4 1
1
<?php
2
3
namespace Freyo\Flysystem\QcloudCOSv3\Client;
4
5
class Conf
6
{
7
    const PKG_VERSION = 'v3.3';
8
9
    const API_IMAGE_END_POINT = 'http://web.image.myqcloud.com/photos/v1/';
10
    const API_VIDEO_END_POINT = 'http://web.video.myqcloud.com/videos/v1/';
11
    const API_COSAPI_END_POINT = 'http://web.file.myqcloud.com/files/v1/';
12
13
    //请到http://console.qcloud.com/cos去获取你的appid、sid、skey
14
    private static $APPID;
15
    private static $SECRET_ID;
16
    private static $SECRET_KEY;
17
18
    public static function setAppId($appId)
19
    {
20
        self::$APPID = $appId;
21
    }
22
23
    public static function setSecretId($secretId)
24
    {
25
        self::$SECRET_ID = $secretId;
26
    }
27
28
    public static function setSecretKey($secretKey)
29
    {
30
        self::$SECRET_KEY = $secretKey;
31
    }
32
33 14
    public static function getAppId()
34
    {
35 14
        return self::$APPID;
36
    }
37
38 14
    public static function getSecretId()
39
    {
40 14
        return self::$SECRET_ID;
41
    }
42
43 14
    public static function getSecretKey()
44
    {
45 14
        return self::$SECRET_KEY;
46
    }
47
48 14
    public static function getUA()
49
    {
50 14
        return 'cos-php-sdk-'.self::PKG_VERSION;
51
    }
52
}
53
54
//end of script
55