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

RequestRefreshTokenEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
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