AccessToken   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Test Coverage

Coverage 35.7%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 65
ccs 5
cts 14
cp 0.357
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getExpires() 0 4 1
A setScreenName() 0 3 1
A getScreenName() 0 3 1
A getUserId() 0 3 1
A getToken() 0 4 1
A setUserId() 0 3 1
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace SocialConnect\OAuth1;
8
9
use SocialConnect\Provider\AccessTokenInterface;
10
11
class AccessToken extends \SocialConnect\OAuth1\Token implements AccessTokenInterface
12
{
13
    /**
14
     * @var integer
15
     */
16
    protected $userId;
17
18
    /**
19
     * @var string
20
     */
21
    protected $screenName;
22
23
    /**
24
     * @var int
25
     */
26
    protected $x_auth_expires = 0;
27
28
    /**
29
     * @return int
30
     */
31 1
    public function getUserId()
32
    {
33 1
        return $this->userId;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getScreenName()
40
    {
41
        return $this->screenName;
42
    }
43
44
    /**
45
     * @param $userId
46
     */
47 1
    public function setUserId($userId)
48
    {
49 1
        $this->userId = $userId;
50 1
    }
51
52
    /**
53
     * @param $screenName
54
     */
55
    public function setScreenName($screenName)
56
    {
57
        $this->screenName = $screenName;
58
    }
59
60
    /**
61
     * @return string|null
62
     */
63
    public function getToken()
64
    {
65
        // It's a key, not a secret
66
        return $this->key;
67
    }
68
69
    /**
70
     * @return int|null
71
     */
72
    public function getExpires()
73
    {
74
        // @todo support
75
        return null;
76
    }
77
}
78