Completed
Push — master ( 2994aa...19d116 )
by Patrick
08:28
created

AccessToken   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 121
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 121
ccs 0
cts 34
cp 0
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getToken() 0 4 1
A getTokenType() 0 4 1
A getBearer() 0 4 1
A getUid() 0 4 1
A getAccountId() 0 4 1
A getTeamId() 0 4 1
1
<?php
2
namespace Dropbox\Models;
3
4
class AccessToken extends BaseModel
5
{
6
    /**
7
     * Access Token
8
     *
9
     * @var string
10
     */
11
    protected $token;
12
13
    /**
14
     * Token Type
15
     *
16
     * @var string
17
     */
18
    protected $tokenType;
19
20
    /**
21
     * Bearer
22
     *
23
     * @var string
24
     */
25
    protected $bearer;
26
27
    /**
28
     * User ID
29
     *
30
     * @var string
31
     */
32
    protected $uid;
33
34
    /**
35
     * Account ID
36
     *
37
     * @var string
38
     */
39
    protected $accountId;
40
41
    /**
42
     * Team ID
43
     *
44
     * @var string
45
     */
46
    protected $teamId;
47
48
    /**
49
     * Create a new AccessToken instance
50
     *
51
     * @param array $data
52
     */
53
    public function __construct(array $data)
54
    {
55
        parent::__construct($data);
56
57
        $this->token = $this->getDataProperty('access_token');
58
        $this->tokenType = $this->getDataProperty('token_type');
59
        $this->bearer = $this->getDataProperty('bearer');
60
        $this->uid = $this->getDataProperty('uid');
61
        $this->accountId = $this->getDataProperty('account_id');
62
        $this->teamId = $this->getDataProperty('team_id');
63
    }
64
65
    /**
66
     * Get Access Token
67
     *
68
     * @return string
69
     */
70
    public function getToken()
71
    {
72
        return $this->token;
73
    }
74
75
    /**
76
     * Get Token Type
77
     *
78
     * @return string
79
     */
80
    public function getTokenType()
81
    {
82
        return $this->tokenType;
83
    }
84
85
    /**
86
     * Get Bearer
87
     *
88
     * @return string
89
     */
90
    public function getBearer()
91
    {
92
        return $this->bearer;
93
    }
94
95
    /**
96
     * Get User ID
97
     *
98
     * @return string
99
     */
100
    public function getUid()
101
    {
102
        return $this->uid;
103
    }
104
105
    /**
106
     * Get Account ID
107
     *
108
     * @return string
109
     */
110
    public function getAccountId()
111
    {
112
        return $this->accountId;
113
    }
114
115
    /**
116
     * Get Team ID
117
     *
118
     * @return string
119
     */
120
    public function getTeamId()
121
    {
122
        return $this->teamId;
123
    }
124
}
125