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

AccessToken   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 3 1
A __construct() 0 6 1
A getRefreshToken() 0 3 1
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
}