| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function check(AuthorizationRequest $authorization): void |
||
| 23 | { |
||
| 24 | if (!$authorization->hasQueryParam('response_type')) { |
||
| 25 | throw new InvalidArgumentException('The parameter "response_type" is mandatory.'); |
||
| 26 | } |
||
| 27 | $response_type = explode(' ', $authorization->getQueryParam('response_type')); |
||
| 28 | if (\in_array('id_token', $response_type, true) && !$authorization->hasQueryParam('nonce')) { |
||
| 29 | throw new InvalidArgumentException('The parameter "nonce" is mandatory when the response type "id_token" is used.'); |
||
| 30 | } |
||
| 33 |