Token::getRefreshToken()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Mechpave\ImgurClient\Entity;
4
5
/**
6
 * Class Token
7
 * @package Mechpave\ImgurClient\Entity
8
 */
9
class Token implements TokenInterface
10
{
11
    /**
12
     * Access token
13
     * @var string
14
     */
15
    protected $accessToken;
16
17
    /**
18
     * Refresh token
19
     * @var string
20
     */
21
    protected $refreshToken;
22
23
    /**
24
     * Timestamp of token expiration
25
     * @var int
26
     */
27
    protected $expiresAt;
28
29
    /**
30
     * Account Id, token is connected to
31
     * @var int
32
     */
33
    protected $accountId;
34
35
    /**
36
     * @inheritdoc
37
     */
38 4
    public function setAccessToken($accessToken)
39
    {
40 4
        $this->accessToken = $accessToken;
41
42 4
        return $this;
43
    }
44
45
    /**
46
     * @inheritdoc
47
     */
48 2
    public function getAccessToken()
49
    {
50 2
        return $this->accessToken;
51
    }
52
53
    /**
54
     * @inheritdoc
55
     */
56 4
    public function setRefreshToken($refreshToken)
57
    {
58 4
        $this->refreshToken = $refreshToken;
59
60 4
        return $this;
61
    }
62
63
    /**
64
     * @inheritdoc
65
     */
66 2
    public function getRefreshToken()
67
    {
68 2
        return $this->refreshToken;
69
    }
70
71
    /**
72
     * @inheritdoc
73
     */
74 3
    public function setExpiresAt($timestamp)
75
    {
76 3
        $this->expiresAt = $timestamp;
77
78 3
        return $this;
79
    }
80
81
    /**
82
     * @inheritdoc
83
     */
84 3
    public function getExpiresAt()
85
    {
86 3
        return $this->expiresAt;
87
    }
88
89
    /**
90
     * @inheritdoc
91
     */
92 1
    public function setAccountId($accountId)
93
    {
94 1
        $this->accountId = $accountId;
95
96 1
        return $this;
97
    }
98
99
    /**
100
     * @inheritdoc
101
     */
102 1
    public function getAccountId()
103
    {
104 1
        return $this->accountId;
105
    }
106
}