@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | ContextInterface $context, |
39 | 39 | array $optimizedTargets, |
40 | 40 | ?LoggerInterface $logger |
41 | - ): Generator; |
|
41 | + ) : Generator; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param ContextInterface $context |
@@ -53,5 +53,5 @@ discard block |
||
53 | 53 | int $match, |
54 | 54 | array $encodedItem, |
55 | 55 | ?LoggerInterface $logger |
56 | - ): array; |
|
56 | + ) : array; |
|
57 | 57 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $encPoliciesOrSets, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return self::evaluateDenyUnlessPermit($context, $optimizedTargets, $encPoliciesOrSets, $logger); |
47 | 47 | } |
48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $encodedRules, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return self::evaluateDenyUnlessPermit($context, $optimizedTargets, $encodedRules, $logger); |
47 | 47 | } |
48 | 48 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | ContextInterface $context, |
43 | 43 | array $optimizedTargets, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): Generator { |
|
45 | + ) : Generator { |
|
46 | 46 | list($isOptimizedForSwitch, $data) = $optimizedTargets; |
47 | 47 | if ($isOptimizedForSwitch === true) { |
48 | 48 | assert(count($data) === 2); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ContextInterface $context, |
97 | 97 | array $target, |
98 | 98 | ?LoggerInterface $logger |
99 | - ): int { |
|
99 | + ) : int { |
|
100 | 100 | /** @see http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html #7.11 (table 4) */ |
101 | 101 | |
102 | 102 | assert(Encoder::isTarget($target) === true); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * |
165 | 165 | * @return array |
166 | 166 | */ |
167 | - protected static function encodeTarget(?TargetInterface $target): array |
|
167 | + protected static function encodeTarget(?TargetInterface $target) : array |
|
168 | 168 | { |
169 | 169 | $name = null; |
170 | 170 | $anyOfs = null; |
@@ -191,11 +191,11 @@ discard block |
||
191 | 191 | * @SuppressWarnings(PHPMD.ElseExpression) |
192 | 192 | * @SuppressWarnings(PHPMD.CyclomaticComplexity) |
193 | 193 | */ |
194 | - private function tryToEncodeTargetsAsSwitch(array $targets): ?array |
|
194 | + private function tryToEncodeTargetsAsSwitch(array $targets): ? array |
|
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) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $encPoliciesOrSets, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return static::evaluatePermitOverrides($context, $optimizedTargets, $encPoliciesOrSets, $logger); |
47 | 47 | } |
48 | 48 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | ContextInterface $context, |
50 | 50 | array $policiesAndSetsData, |
51 | 51 | ?LoggerInterface $logger |
52 | - ): array { |
|
52 | + ) : array { |
|
53 | 53 | return static::callAlgorithm( |
54 | 54 | static::getCallable($policiesAndSetsData), |
55 | 55 | $context, |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | int $match, |
111 | 111 | array $encodedPolicy, |
112 | 112 | ?LoggerInterface $logger |
113 | - ): array { |
|
113 | + ) : array { |
|
114 | 114 | assert(Encoder::isPolicy($encodedPolicy)); |
115 | 115 | assert($match !== TargetMatchEnum::NO_TARGET); |
116 | 116 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | int $match, |
179 | 179 | array $encodedPolicySet, |
180 | 180 | ?LoggerInterface $logger |
181 | - ): array { |
|
181 | + ) : array { |
|
182 | 182 | assert(Encoder::isPolicySet($encodedPolicySet)); |
183 | 183 | |
184 | 184 | /** @see http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html #7.13 (table 6) */ |
@@ -242,12 +242,11 @@ discard block |
||
242 | 242 | int $match, |
243 | 243 | array $encodedItem, |
244 | 244 | ?LoggerInterface $logger |
245 | - ): array { |
|
245 | + ) : array { |
|
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 | /** |
@@ -258,7 +257,7 @@ discard block |
||
258 | 257 | * |
259 | 258 | * @SuppressWarnings(PHPMD.StaticAccess) |
260 | 259 | */ |
261 | - private static function correctEvaluationOnIntermediateTarget(int $evaluation, ?LoggerInterface $logger): int |
|
260 | + private static function correctEvaluationOnIntermediateTarget(int $evaluation, ?LoggerInterface $logger) : int |
|
262 | 261 | { |
263 | 262 | /** @see http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-os-en.html #7.14 (table 7) */ |
264 | 263 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $encodedRules, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return self::evaluatePermitUnlessDeny($context, $optimizedTargets, $encodedRules, $logger); |
47 | 47 | } |
48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $serializedRules, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return static::evaluatePermitOverrides($context, $optimizedTargets, $serializedRules, $logger); |
47 | 47 | } |
48 | 48 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | array $optimizedTargets, |
43 | 43 | array $encodedRules, |
44 | 44 | ?LoggerInterface $logger |
45 | - ): array { |
|
45 | + ) : array { |
|
46 | 46 | return self::evaluateFirstApplicable($context, $optimizedTargets, $encodedRules, $logger); |
47 | 47 | } |
48 | 48 | } |