@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | $exceptionThrown = false; |
199 | 199 | $context = new Context(new Request([]), [ |
200 | - 'key11_1' => function () use (&$exceptionThrown) { |
|
200 | + 'key11_1' => function() use (&$exceptionThrown) { |
|
201 | 201 | $exceptionThrown = true; |
202 | 202 | throw new RuntimeException(); |
203 | 203 | }, |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | 'key22_1' => 'value22_1', |
378 | 378 | 'key22_2' => 'value22_2', |
379 | 379 | ]); |
380 | - $allOf3 = new AllOf([ |
|
380 | + $allOf3 = new AllOf([ |
|
381 | 381 | 'key31' => 'value31', |
382 | 382 | ]); |
383 | 383 | |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | ->setCondition(new Logical([self::class, $methodName])) |
396 | 396 | ->setObligations([new Obligation(EvaluationEnum::PERMIT, [self::class, 'ruleObligation1'])]) |
397 | 397 | ->setAdvice([new Advice(EvaluationEnum::PERMIT, [self::class, 'ruleAdvice1'])]); |
398 | - $rule2 = (new Rule()) |
|
398 | + $rule2 = (new Rule()) |
|
399 | 399 | ->setEffect(new Logical([self::class, 'effectDeny'])) |
400 | 400 | ->setTarget($target2) |
401 | 401 | ->setCondition(new Logical([self::class, $methodName])) |
@@ -515,7 +515,7 @@ |
||
515 | 515 | ContextProperties::PARAM_CURRENT_USER_ROLE => $this->currentUserRole, |
516 | 516 | ContextProperties::PARAM_USER_IS_SIGNED_IN => $this->currentUserId !== null && |
517 | 517 | $this->currentUserRole !== null, |
518 | - ContextProperties::PARAM_IS_WORK_TIME => function () { |
|
518 | + ContextProperties::PARAM_IS_WORK_TIME => function() { |
|
519 | 519 | return $this->isWorkTime; |
520 | 520 | }, |
521 | 521 | ]; |
@@ -246,8 +246,7 @@ |
||
246 | 246 | $isSet = Encoder::isPolicySet($encodedItem); |
247 | 247 | |
248 | 248 | return $isSet === true ? |
249 | - static::evaluatePolicySet($context, $match, $encodedItem, $logger) : |
|
250 | - static::evaluatePolicy($context, $match, $encodedItem, $logger); |
|
249 | + static::evaluatePolicySet($context, $match, $encodedItem, $logger) : static::evaluatePolicy($context, $match, $encodedItem, $logger); |
|
251 | 250 | } |
252 | 251 | |
253 | 252 | /** |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | { |
175 | 175 | // check every item is Obligation (debug mode only) |
176 | 176 | assert(call_user_func( |
177 | - function () use ($obligations) { |
|
177 | + function() use ($obligations) { |
|
178 | 178 | foreach ($obligations as $item) { |
179 | 179 | assert($item instanceof ObligationInterface); |
180 | 180 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | { |
205 | 205 | // check every item is Obligation (debug mode only) |
206 | 206 | assert(call_user_func( |
207 | - function () use ($advice) { |
|
207 | + function() use ($advice) { |
|
208 | 208 | foreach ($advice as $item) { |
209 | 209 | assert($item instanceof AdviceInterface); |
210 | 210 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function __construct(callable $staticMethod) |
35 | 35 | { |
36 | 36 | assert( |
37 | - is_array($staticMethod) === true && count((array)$staticMethod) === 2 && |
|
37 | + is_array($staticMethod) === true && count((array) $staticMethod) === 2 && |
|
38 | 38 | is_string($staticMethod[0]) === true && is_string($staticMethod[1]) === true, |
39 | 39 | 'Only array form of static callable method is supported.' |
40 | 40 | ); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | const PERMIT = (1 << 0); |
28 | 28 | |
29 | 29 | /** Combine result */ |
30 | - const DENY = (1 << 1); |
|
30 | + const DENY = (1 << 1); |
|
31 | 31 | |
32 | 32 | /** Combine result */ |
33 | 33 | const INDETERMINATE = (1 << 2); |
@@ -27,10 +27,10 @@ |
||
27 | 27 | const MATCH = 0; |
28 | 28 | |
29 | 29 | /** Combine result */ |
30 | - const NOT_MATCH = self::MATCH + 1; |
|
30 | + const NOT_MATCH = self::MATCH + 1; |
|
31 | 31 | |
32 | 32 | /** Combine result */ |
33 | - const NO_TARGET = self::NOT_MATCH + 1; |
|
33 | + const NO_TARGET = self::NOT_MATCH + 1; |
|
34 | 34 | |
35 | 35 | /** Combine result */ |
36 | 36 | const INDETERMINATE = self::NO_TARGET + 1; |