Passed
Pull Request — master (#1184)
by
unknown
33:24
created

RefreshTokenIssued::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
nc 1
nop 2
dl 0
loc 7
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace League\OAuth2\Server\Events;
4
5
use League\OAuth2\Server\Entities\RefreshTokenEntityInterface;
6
use Psr\Http\Message\ServerRequestInterface;
7
8
final class RefreshTokenIssued extends AbstractEvent
9
{
10
    /** @var RefreshTokenEntityInterface */
11
    private $refreshToken;
12
13
    public function __construct(
14
        RefreshTokenEntityInterface $refreshToken,
15
        ServerRequestInterface $request
16
    ) {
17
        parent::__construct($request);
18
        $this->name = 'refresh_token.issued';
19
        $this->refreshToken = $refreshToken;
20
    }
21
22
    public function getRefreshToken(): RefreshTokenEntityInterface
23
    {
24
        return $this->refreshToken;
25
    }
26
}
27