Passed
Push — master ( e88490...575397 )
by Alexandre
04:15
created

Config   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 48
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setIdTokenLifetime() 0 3 1
A getIdTokenLifetime() 0 3 1
A setIssuerIdentifier() 0 3 1
A __construct() 0 4 1
A getIssuerIdentifier() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Alexandre
5
 * Date: 15/03/2018
6
 * Time: 21:56
7
 */
8
9
namespace OAuth2\Extensions\OpenID;
10
11
12
class Config extends \OAuth2\Config
13
{
14
    /**
15
     * @var string
16
     */
17
    private $issuerIdentifier;
18
19
    /**
20
     * @var int
21
     */
22
    protected $idTokenLifetime = 1800;
23
24
    public function __construct(string $issuerIdentifier)
25
    {
26
        parent::__construct();
27
        $this->issuerIdentifier = $issuerIdentifier;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getIssuerIdentifier(): string
34
    {
35
        return $this->issuerIdentifier;
36
    }
37
38
    /**
39
     * @param string $issuerIdentifier
40
     */
41
    public function setIssuerIdentifier(string $issuerIdentifier): void
42
    {
43
        $this->issuerIdentifier = $issuerIdentifier;
44
    }
45
46
    /**
47
     * @return int
48
     */
49
    public function getIdTokenLifetime(): int
50
    {
51
        return $this->idTokenLifetime;
52
    }
53
54
    /**
55
     * @param int $idTokenLifetime
56
     */
57
    public function setIdTokenLifetime(int $idTokenLifetime): void
58
    {
59
        $this->idTokenLifetime = $idTokenLifetime;
60
    }
61
}