Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
1 | <?php |
||
37 | 14 | public function resolve(State $currentState, Input $input) : State |
|
38 | { |
||
39 | 14 | $actionKey = $this->getActionKey($currentState, $input); |
|
40 | |||
41 | 14 | if (!empty($this->transitions[$actionKey])) { |
|
42 | 12 | return $this->transitions[$actionKey]; |
|
43 | } |
||
44 | |||
45 | 2 | throw new InvalidInputForState($input, $currentState); |
|
46 | } |
||
47 | |||
62 |