Completed
Pull Request — master (#925)
by
unknown
01:37
created

RefreshTokenTrait::getExpiryDateTime()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * @author      Alex Bilbie <[email protected]>
4
 * @copyright   Copyright (c) Alex Bilbie
5
 * @license     http://mit-license.org/
6
 *
7
 * @link        https://github.com/thephpleague/oauth2-server
8
 */
9
10
namespace League\OAuth2\Server\Entities\Traits;
11
12
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
13
14
trait RefreshTokenTrait
15
{
16
    /**
17
     * @var AccessTokenEntityInterface
18
     */
19
    protected $accessToken;
20
21
    /**
22
     * @var \DateTime
23
     */
24
    protected $expiryDateTime;
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 10
    public function setAccessToken(AccessTokenEntityInterface $accessToken)
30
    {
31 10
        $this->accessToken = $accessToken;
32 10
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 1
    public function getAccessToken()
38
    {
39 1
        return $this->accessToken;
40
    }
41
42
    /**
43
     * Get the token's expiry date time.
44
     *
45
     * @return \DateTime
46
     */
47
    public function getExpiryDateTime()
48
    {
49
        return $this->expiryDateTime;
50
    }
51
52
    /**
53
     * Set the date time when the token expires.
54
     *
55
     * @param \DateTime $dateTime
56
     */
57 10
    public function setExpiryDateTime(\DateTime $dateTime)
58
    {
59 10
        $this->expiryDateTime = $dateTime;
60 10
    }
61
}
62