Completed
Pull Request — master (#97)
by
unknown
03:44
created

DropboxApp   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 63.64%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 72
ccs 7
cts 11
cp 0.6364
rs 10
c 2
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getClientId() 0 4 1
A getClientSecret() 0 4 1
A getAccessToken() 0 4 1
1
<?php
2
namespace Kunnu\Dropbox;
3
4
class DropboxApp
5
{
6
7
    /**
8
     * The Client ID of the App
9
     *
10
     * @link https://www.dropbox.com/developers/apps
11
     *
12
     * @var string
13
     */
14
    protected $clientId;
15
16
    /**
17
     * The Client Secret of the App
18
     *
19
     * @link https://www.dropbox.com/developers/apps
20
     *
21
     * @var string
22
     */
23
    protected $clientSecret;
24
25
    /**
26
     * The Access Token
27
     *
28
     * @var string
29
     */
30
    protected $accessToken;
31
32
    /**
33
     * Create a new Dropbox instance
34
     *
35
     * @param string $clientId     Application Client ID
36
     * @param string $clientSecret Application Client Secret
37
     * @param string $accessToken  Access Token
38
     */
39 58
    public function __construct($clientId, $clientSecret, $accessToken = null)
40
    {
41 58
        $this->clientId = $clientId;
42 58
        $this->clientSecret = $clientSecret;
43 58
        $this->accessToken = $accessToken;
44 58
    }
45
46
    /**
47
     * Get the App Client ID
48
     *
49
     * @return string
50
     */
51
    public function getClientId()
52
    {
53
        return $this->clientId;
54
    }
55
56
    /**
57
     * Get the App Client Secret
58
     *
59
     * @return string
60
     */
61
    public function getClientSecret()
62
    {
63
        return $this->clientSecret;
64
    }
65
66
    /**
67
     * Get the Access Token
68
     *
69
     * @return string
70
     */
71 58
    public function getAccessToken()
72
    {
73 58
        return $this->accessToken;
74
    }
75
}
76