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

RefreshTokenClientFailed::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
nc 1
nop 3
dl 0
loc 9
c 1
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace League\OAuth2\Server\Events;
4
5
use Psr\Http\Message\ServerRequestInterface;
6
7
final class RefreshTokenClientFailed extends AbstractEvent
8
{
9
    /** @var string|null */
10
    private $clientId;
11
12
    /** @var array */
13
    private $refreshTokenData;
14
15
    public function __construct(
16
        ?string $clientId,
17
        array $refreshTokenData,
18
        ServerRequestInterface $request
19
    ) {
20
        parent::__construct($request);
21
        $this->name = 'refresh_token.client.failed';
22
        $this->clientId = $clientId;
23
        $this->refreshTokenData = $refreshTokenData;
24
    }
25
26
    public function getClientId(): ?string
27
    {
28
        return $this->clientId;
29
    }
30
31
    public function getRefreshTokenData(): array
32
    {
33
        return $this->refreshTokenData;
34
    }
35
}
36