Completed
Push — master ( 765a08...3c4d83 )
by Neomerx
04:45
created
tests/Authorization/PolicyDecision/PolicyDecisionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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]))
Please login to merge, or discard this patch.
tests/Authorization/PolicyEnforcement/PolicyEnforcementTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -515,7 +515,7 @@
 block discarded – undo
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
         ];
Please login to merge, or discard this patch.
src/Authorization/PolicyDecision/Algorithms/BasePolicyOrSetAlgorithm.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -246,8 +246,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Authorization/PolicyAdministration/Rule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/Authorization/PolicyAdministration/Method.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
src/Contracts/Authorization/PolicyAdministration/EvaluationEnum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Contracts/Authorization/PolicyAdministration/TargetMatchEnum.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.