Completed
Push — orm ( df18d5...6592b1 )
by
unknown
02:37
created

AccessToken::getExpireIn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Majora\Component\OAuth\Entity;
4
5
use Majora\Component\OAuth\Model\AccessTokenInterface;
6
use Majora\Component\OAuth\Model\AccountInterface;
7
use Majora\Component\OAuth\Model\ApplicationInterface;
8
use Majora\Component\OAuth\Model\RefreshTokenInterface;
9
10
11
/**
12
 * Access token class.
13
 */
14
class AccessToken extends Token implements AccessTokenInterface
15
{
16
    /**
17
     * @var RefreshTokenInterface
18
     */
19
    protected $refreshToken;
20
21
    /**
22
     * @see AccessTokenInterface::__construct()
23
     */
24
    public function __construct(
25
        ApplicationInterface $application,
26
        AccountInterface $account = null,
27
        $expireIn = AccessTokenInterface::DEFAULT_TTL,
28
        $hash = null,
29
        RefreshTokenInterface $refreshToken = null
30
    ) {
31
        parent::__construct($application, $account, $expireIn, $hash);
32
        $this->refreshToken = $refreshToken;
33
    }
34
35
    /**
36
     * @see AccessTokenInterface::getRefreshToken()
37
     */
38
    public function getRefreshToken()
39
    {
40
        return $this->refreshToken;
41
    }
42
}
43