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

RefreshTokenIssued   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 17
c 1
b 0
f 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRefreshToken() 0 3 1
A __construct() 0 7 1
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