| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 17 | 4 | public function call( | |
| 18 | Session $session, | ||
| 19 | CurrentPinInputInterface $currentPinInput, | ||
| 20 | GetPublicKey $getPublicKey | ||
| 21 |     ): PublicKey { | ||
| 22 | 4 | $proto = $session->sendMessage(Message::getPublicKey($getPublicKey)); | |
| 23 | 4 |         if ($proto instanceof PinMatrixRequest) { | |
| 24 | 2 | $proto = $session->sendMessage($this->provideCurrentPin($proto, $currentPinInput)); | |
| 25 | } | ||
| 26 | |||
| 27 | 3 |         if (!($proto instanceof PublicKey)) { | |
| 28 | 1 |             throw new UnexpectedResultException("Unexpected response, expecting PublicKey, got " . get_class($proto)); | |
| 29 | } | ||
| 30 | |||
| 31 | 2 | return $proto; | |
| 32 | } | ||
| 34 |