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

DropboxApp::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 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