| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function requireSelectedSecondFactor(LoggerInterface $contextualLogger) |
||
| 31 | { |
||
| 32 | $selectedSecondFactor = $this->responseContext->getSelectedSecondFactor(); |
||
| 33 | |||
| 34 | if (!$selectedSecondFactor) { |
||
| 35 | $contextualLogger->error( |
||
| 36 | 'Cannot verify possession of an unknown second factor' |
||
| 37 | ); |
||
| 38 | |||
| 39 | throw new BadRequestHttpException('Cannot verify possession of an unknown second factor.'); |
||
| 40 | } |
||
| 41 | |||
| 42 | return $selectedSecondFactor; |
||
| 43 | } |
||
| 44 | } |
||
| 45 |