Passed
Push — master ( 108f13...5c696b )
by Andrew
01:50 queued 10s
created

RequestRefreshTokenEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 24
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRefreshToken() 0 3 1
1
<?php
2
/**
3
 * @author      Alex Bilbie <[email protected]>
4
 * @copyright   Copyright (c) Alex Bilbie
5
 * @license     http://mit-license.org/
6
 *
7
 * @link        https://github.com/thephpleague/oauth2-server
8
 */
9
10
namespace League\OAuth2\Server;
11
12
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
13
use Psr\Http\Message\ServerRequestInterface;
14
15
class RequestRefreshTokenEvent extends RequestEvent
16
{
17
    /**
18
     * @var RefreshTokenEntityInterface
19
     */
20
    private $refreshToken;
21
22
    /**
23
     * @param string                 $name
24
     * @param ServerRequestInterface $request
25
     */
26 9
    public function __construct($name, ServerRequestInterface $request, RefreshTokenEntityInterface $refreshToken)
27
    {
28 9
        parent::__construct($name, $request);
29 9
        $this->refreshToken = $refreshToken;
30 9
    }
31
32
    /**
33
     * @return RefreshTokenEntityInterface
34
     * @codeCoverageIgnore
35
     */
36
    public function getRefreshToken()
37
    {
38
        return $this->refreshToken;
39
    }
40
}
41