@@ -35,28 +35,28 @@ |
||
35 | 35 | $closure = $this->authorizationClosure; |
36 | 36 | $result = $closure($votingSubject, $votingContext); |
37 | 37 | |
38 | - $result = $this->prepareResult($result); |
|
38 | + $result = $this->prepareResult($result); |
|
39 | 39 | |
40 | - return $result; |
|
40 | + return $result; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
44 | 44 | /** |
45 | - * @param mixed $result |
|
46 | - * @return SingleVoterResult |
|
47 | - */ |
|
48 | - public function prepareResult($result) |
|
49 | - { |
|
50 | - if ($result === true) { |
|
51 | - $result = new SingleVoterResult(VotingDecisionEnum::ALLOWED()); |
|
52 | - return $result; |
|
53 | - } elseif ($result === false) { |
|
54 | - $result = new SingleVoterResult(VotingDecisionEnum::DENIED()); |
|
55 | - return $result; |
|
56 | - } elseif ($result instanceof VotingDecisionEnum) { |
|
57 | - $result = new SingleVoterResult($result); |
|
58 | - return $result; |
|
59 | - } |
|
60 | - return $result; |
|
61 | - } |
|
45 | + * @param mixed $result |
|
46 | + * @return SingleVoterResult |
|
47 | + */ |
|
48 | + public function prepareResult($result) |
|
49 | + { |
|
50 | + if ($result === true) { |
|
51 | + $result = new SingleVoterResult(VotingDecisionEnum::ALLOWED()); |
|
52 | + return $result; |
|
53 | + } elseif ($result === false) { |
|
54 | + $result = new SingleVoterResult(VotingDecisionEnum::DENIED()); |
|
55 | + return $result; |
|
56 | + } elseif ($result instanceof VotingDecisionEnum) { |
|
57 | + $result = new SingleVoterResult($result); |
|
58 | + return $result; |
|
59 | + } |
|
60 | + return $result; |
|
61 | + } |
|
62 | 62 | } |