@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | /** |
60 | 60 | * @param ContextInterface $context |
61 | - * @param array|null $serializedLogical |
|
61 | + * @param callable|null $serializedLogical |
|
62 | 62 | * |
63 | 63 | * @return bool |
64 | 64 | */ |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | |
366 | 366 | /** |
367 | 367 | * @param array $storage |
368 | - * @param string|int $key |
|
368 | + * @param integer $key |
|
369 | 369 | * @param array $list |
370 | 370 | * |
371 | 371 | * @return array |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | /** |
330 | 330 | * @param array $obligations |
331 | 331 | * @param int $evaluation |
332 | - * @param array $obligationsMap |
|
332 | + * @param callable[] $obligationsMap |
|
333 | 333 | * |
334 | 334 | * @return array |
335 | 335 | * |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | /** |
344 | 344 | * @param array $advice |
345 | 345 | * @param int $evaluation |
346 | - * @param array $adviceMap |
|
346 | + * @param callable[] $adviceMap |
|
347 | 347 | * |
348 | 348 | * @return array |
349 | 349 | * |
@@ -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 | /** |
@@ -542,7 +542,7 @@ |
||
542 | 542 | |
543 | 543 | /** |
544 | 544 | * @param RuleCombiningAlgorithmInterface $algorithm |
545 | - * @param array $rules |
|
545 | + * @param RuleInterface[] $rules |
|
546 | 546 | * |
547 | 547 | * @return array |
548 | 548 | */ |
@@ -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; |
@@ -195,7 +195,7 @@ |
||
195 | 195 | { |
196 | 196 | $result = count($targets) > 1; |
197 | 197 | |
198 | - $contextKey = null; |
|
198 | + $contextKey = null; |
|
199 | 199 | $valueRuleIdMap = []; |
200 | 200 | |
201 | 201 | foreach ($targets as $ruleId => $nullableTarget) { |