Completed
Push — master ( 683c35...fec6f1 )
by Alexandre
02:03
created

AccessToken::getRefreshToken()   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: 07/03/2018
6
 * Time: 22:55
7
 */
8
9
namespace OAuth2\Credentials;
10
11
12
/**
13
 * Class AccessToken
14
 * @package OAuth2\Credentials
15
 */
16
class AccessToken extends Token implements AccessTokenInterface
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $type;
22
23
    public function __construct(string $type, string $token, array $scopes, string $clientIdentifier,
24
                                ?string $resourceOwnerIdentifier, \DateTimeInterface $expiresAt,
25
                                ?string $authorizationCode = null)
26
    {
27
        parent::__construct($token, $scopes, $clientIdentifier, $resourceOwnerIdentifier, $expiresAt, $authorizationCode);
28
        $this->type = $type;
29
    }
30
31
    public function getType(): string
32
    {
33
        return $this->type;
34
    }
35
36
    /**
37
     * @return null|string
38
     */
39
    public function getRefreshToken(): ?string
40
    {
41
        return $this->refreshToken;
42
    }
43
}