Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 6.5971 |
Changes | 0 |
1 | <?php |
||
47 | 2 | public function prepareResult($result) |
|
48 | { |
||
49 | 2 | if ($result === true) { |
|
50 | $result = new SingleVoterResult(VotingDecisionEnum::ALLOWED()); |
||
51 | return $result; |
||
52 | 2 | } elseif ($result === false) { |
|
53 | $result = new SingleVoterResult(VotingDecisionEnum::DENIED()); |
||
54 | return $result; |
||
55 | 2 | } elseif ($result instanceof VotingDecisionEnum) { |
|
56 | $result = new SingleVoterResult($result); |
||
57 | return $result; |
||
58 | } |
||
59 | 2 | return $result; |
|
60 | } |
||
61 | } |
||
62 |