Passed
Pull Request — master (#1316)
by
unknown
32:56
created

IdTokenClaimsCreatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBuilder() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace League\OAuth2\Server;
6
7
use Lcobucci\JWT\Builder;
8
9
/**
10
 * IdTokenClaimsCreatedEvent Event helps to extend claims of the id_token
11
 *
12
 * A usecase is to add nonce If requested by the client
13
 *
14
 * @author Marc Riemer <[email protected]>
15
 */
16
final class IdTokenClaimsCreatedEvent extends IdTokenEvent
17
{
18
    /**
19
     * Builder
20
     */
21
    private Builder $builder;
22
23
    public function __construct(string $name, Builder $builder)
24
    {
25
        parent::__construct($name);
26
        $this->builder = $builder;
27
    }
28
29
    public function getBuilder(): Builder
30
    {
31
        return $this->builder;
32
    }
33
}
34