Completed
Push — master ( 1de13c...bf55ce )
by Alex
33:38
created

AbstractResponseType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 2
c 3
b 1
f 0
lcom 0
cbo 1
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setAccessToken() 0 4 1
A setRefreshToken() 0 4 1
1
<?php
2
/**
3
 * OAuth 2.0 Abstract Response Type.
4
 *
5
 * @author      Alex Bilbie <[email protected]>
6
 * @copyright   Copyright (c) Alex Bilbie
7
 * @license     http://mit-license.org/
8
 *
9
 * @link        https://github.com/thephpleague/oauth2-server
10
 */
11
namespace League\OAuth2\Server\ResponseTypes;
12
13
use League\OAuth2\Server\CryptTrait;
14
use League\OAuth2\Server\Entities\AccessTokenEntityInterface;
15
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
16
17
abstract class AbstractResponseType implements ResponseTypeInterface
18
{
19
    use CryptTrait;
20
21
    /**
22
     * @var \League\OAuth2\Server\Entities\AccessTokenEntityInterface
23
     */
24
    protected $accessToken;
25
26
    /**
27
     * @var \League\OAuth2\Server\Entities\RefreshTokenEntityInterface
28
     */
29
    protected $refreshToken;
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function setAccessToken(AccessTokenEntityInterface $accessToken)
35
    {
36
        $this->accessToken = $accessToken;
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function setRefreshToken(RefreshTokenEntityInterface $refreshToken)
43
    {
44
        $this->refreshToken = $refreshToken;
45
    }
46
}
47