Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
17 | public function call( |
||
18 | Session $session, |
||
19 | GetEntropy $getEntropy |
||
20 | ): Entropy { |
||
21 | |||
22 | $proto = $session->sendMessage(Message::getEntropy($getEntropy)); |
||
23 | if ($proto instanceof ButtonRequest) { |
||
24 | $proto = $session->sendMessage($this->confirmWithButton($proto, ButtonRequestType::ButtonRequest_ProtectCall())); |
||
25 | } |
||
26 | |||
27 | if (!($proto instanceof Entropy)) { |
||
28 | throw new UnexpectedResultException("Unexpected message returned, expecting Entropy"); |
||
29 | } |
||
30 | |||
31 | return $proto; |
||
32 | } |
||
34 |