Passed
Push — master ( ace734...fbc010 )
by Alexandre
02:09
created

AccessToken::getAuthorizationCode()   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 $token, string $type, 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
}