Completed
Push — master ( 5e1554...b3861e )
by Neomerx
10:42
created
src/Authorization/PolicyDecision/Algorithms/BaseAlgorithmInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
53 53
         int $match,
54 54
         array $encodedItem,
55 55
         ?LoggerInterface $logger
56
-    ): array;
56
+    ) : array;
57 57
 }
Please login to merge, or discard this patch.
Authorization/PolicyDecision/Algorithms/PoliciesOrSetsDenyUnlessPermit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/RulesDenyUnlessPermit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/DefaultTargetSerializeTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
Authorization/PolicyDecision/Algorithms/PoliciesOrSetsPermitOverrides.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/BasePolicyOrSetAlgorithm.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/RulesPermitUnlessDeny.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/RulesPermitOverrides.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/RulesFirstApplicable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.