Passed
Pull Request — master (#1316)
by
unknown
37:37 queued 02:44
created

IdTokenClaimsCreatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getBuilder() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
namespace League\OAuth2\Server;
4
5
use Lcobucci\JWT\Token\Builder;
6
7
/**
8
 * IdTokenClaimsCreatedEvent Event helps to extend claims of the id_token
9
 *
10
 * A usecase is to add nonce If requested by the client
11
 *
12
 * @author Marc Riemer <[email protected]>
13
 */
14
final class IdTokenClaimsCreatedEvent extends IdTokenEvent
15
{
16
    /**
17
     * Builder
18
     *
19
     * @var Builder
20
     */
21
    private $builder;
22
23
    public function __construct($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