| Conditions | 3 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 25 | public function call( | ||
| 26 | Session $session, | ||
| 27 | TrezorProto\LoadDevice $loadDevice | ||
| 28 |     ): TrezorProto\Success { | ||
| 29 | $proto = $session->sendMessage(Message::loadDevice($loadDevice)); | ||
| 30 | |||
| 31 |         if ($proto instanceof TrezorProto\ButtonRequest) { | ||
| 32 | $proto = $this->ack->acknowledge($session, $proto, TrezorProto\ButtonRequestType::ButtonRequest_ProtectCall()); | ||
| 33 | } | ||
| 34 | |||
| 35 |         if (!($proto instanceof TrezorProto\Success)) { | ||
| 36 |             throw new UnexpectedResultException("Unexpected response, expecting Success, got " . get_class($proto)); | ||
| 37 | } | ||
| 38 | |||
| 39 | return $proto; | ||
| 40 | } | ||
| 42 |