Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
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); |
||
|
|||
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 |
||
62 | } |
||
63 | } |
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.