Failed Conditions
Push — master ( aacec5...b5a0b4 )
by Florent
04:50
created

RefreshToken   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * The MIT License (MIT)
7
 *
8
 * Copyright (c) 2014-2018 Spomky-Labs
9
 *
10
 * This software may be modified and distributed under the terms
11
 * of the MIT license.  See the LICENSE file for details.
12
 */
13
14
namespace OAuth2Framework\Component\RefreshTokenGrant\Tests;
15
16
use OAuth2Framework\Component\Core\Client\ClientId;
17
use OAuth2Framework\Component\Core\DataBag\DataBag;
18
use OAuth2Framework\Component\Core\ResourceOwner\ResourceOwnerId;
19
use OAuth2Framework\Component\Core\ResourceServer\ResourceServerId;
20
use OAuth2Framework\Component\RefreshTokenGrant\AbstractRefreshToken;
21
use OAuth2Framework\Component\RefreshTokenGrant\RefreshTokenId;
22
23
final class RefreshToken extends AbstractRefreshToken
24
{
25
    private $id;
26
27
    public function __construct(RefreshTokenId $id, ClientId $clientId, ResourceOwnerId $resourceOwnerId, \DateTimeImmutable $expiresAt, DataBag $parameter, DataBag $metadata, ?ResourceServerId $resourceServerId)
28
    {
29
        parent::__construct($clientId, $resourceOwnerId, $expiresAt, $parameter, $metadata, $resourceServerId);
30
        $this->id = $id;
31
    }
32
33
    public function getId(): RefreshTokenId
34
    {
35
        return $this->id;
36
    }
37
}
38