Passed
Push — master ( 9a636e...af59f2 )
by Alexandre
03:34
created

Token::getExpiresAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 10/03/2018
6
 * Time: 15:57
7
 */
8
9
namespace OAuth2\Credentials;
10
11
12
abstract class Token
13
{
14
    /**
15
     * @var string
16
     */
17
    protected $token;
18
    /**
19
     * @var string
20
     */
21
    protected $scope;
22
    /**
23
     * @var string
24
     */
25
    protected $clientIdentifier;
26
    /**
27
     * @var string|null
28
     */
29
    protected $resourceOwnerIdentifier;
30
    /**
31
     * @var int
32
     */
33
    protected $expiresAt;
34
35
    public function __construct(string $token, string $scope, string $clientIdentifier, ?string $resourceOwnerIdentifier,
36
                                int $expiresAt)
37
    {
38
        $this->token = $token;
39
        $this->scope = $scope;
40
        $this->clientIdentifier = $clientIdentifier;
41
        $this->resourceOwnerIdentifier = $resourceOwnerIdentifier;
42
        $this->expiresAt = $expiresAt;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getToken(): string
49
    {
50
        return $this->token;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getScope(): string
57
    {
58
        return $this->scope;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getClientIdentifier(): string
65
    {
66
        return $this->clientIdentifier;
67
    }
68
69
    /**
70
     * @return string|null
71
     */
72
    public function getResourceOwnerIdentifier(): ?string
73
    {
74
        return $this->resourceOwnerIdentifier;
75
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getExpiresAt(): int
81
    {
82
        return $this->expiresAt;
83
    }
84
}