Config::setIssuerIdentifier()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
use OAuth2\ScopePolicy\Policies\ScopePolicyInterface;
13
14
class Config extends \OAuth2\Config
15
{
16
    /**
17
     * @var string
18
     */
19
    private $issuerIdentifier;
20
21
    /**
22
     * @var int
23
     */
24
    protected $idTokenLifetime = 1800;
25
26
    public function __construct(ScopePolicyInterface $scopePolicy, string $issuerIdentifier)
27
    {
28
        parent::__construct($scopePolicy);
0 ignored issues
show
Unused Code introduced by
The call to OAuth2\Config::__construct() has too many arguments starting with $scopePolicy. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        parent::/** @scrutinizer ignore-call */ 
29
                __construct($scopePolicy);

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.

Loading history...
29
        $this->issuerIdentifier = $issuerIdentifier;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getIssuerIdentifier(): string
36
    {
37
        return $this->issuerIdentifier;
38
    }
39
40
    /**
41
     * @param string $issuerIdentifier
42
     */
43
    public function setIssuerIdentifier(string $issuerIdentifier): void
44
    {
45
        $this->issuerIdentifier = $issuerIdentifier;
46
    }
47
48
    /**
49
     * @return int
50
     */
51
    public function getIdTokenLifetime(): int
52
    {
53
        return $this->idTokenLifetime;
54
    }
55
56
    /**
57
     * @param int $idTokenLifetime
58
     */
59
    public function setIdTokenLifetime(int $idTokenLifetime): void
60
    {
61
        $this->idTokenLifetime = $idTokenLifetime;
62
    }
63
}