php-guard /
oauth-server
| 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
|
|||
| 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 | } |
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.