| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class AuthorizationEndPoint extends BaseAuthorizationEndPoint |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * {@inheritdoc} |
||
| 17 | * |
||
| 18 | * @psalm-mutation-free |
||
| 19 | */ |
||
| 20 | 17 | public function scope(array $scopes): BaseAuthorizationEndPoint |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | 27 | public function uri(): string |
|
| 34 | { |
||
| 35 | 27 | if (isset($this->parameters()['scope'])) { |
|
| 36 | 27 | return parent::uri(); |
|
| 37 | } |
||
| 38 | |||
| 39 | // Add the scope parameter if not yet set |
||
| 40 | 10 | return $this->set('scope', 'openid')->uri(); |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set the nonce |
||
| 45 | * |
||
| 46 | * @param string|null $nonce The nonce, or null to generate it |
||
| 47 | * |
||
| 48 | * @return static |
||
| 49 | */ |
||
| 50 | 3 | public function nonce(?string $nonce = null): self |
|
| 57 | } |
||
| 58 | } |
||
| 59 |