Completed
Push — master ( d2bae3...337415 )
by Jan
04:02
created
src/Entity/UserSystem/PermissionsEmbed.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      */
315 315
     public function getBitValue(string $permission_name, int $bit_n): int
316 316
     {
317
-        if(!$this->isValidPermissionName($permission_name)) {
317
+        if (!$this->isValidPermissionName($permission_name)) {
318 318
             throw new \InvalidArgumentException(sprintf('No permission with the name "%s" is existing!', $permission_name));
319 319
         }
320 320
 
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
     public function setPermissionValue(string $permission_name, int $bit_n, ?bool $new_value) : self
359 359
     {
360 360
         //Determine which bit value the given value is.
361
-        if($new_value === true) {
361
+        if ($new_value === true) {
362 362
             $bit_value = static::ALLOW;
363
-        } elseif($new_value === false) {
363
+        } elseif ($new_value === false) {
364 364
             $bit_value = static::DISALLOW;
365 365
         } else {
366 366
             $bit_value = static::INHERIT;
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
      */
381 381
     public function setBitValue(string $permission_name, int $bit_n, int $new_value) : self
382 382
     {
383
-        if(!$this->isValidPermissionName($permission_name)) {
383
+        if (!$this->isValidPermissionName($permission_name)) {
384 384
             throw new \InvalidArgumentException('No permission with the given name is existing!');
385 385
         }
386 386
 
Please login to merge, or discard this patch.
src/Security/Voter/PartVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
             if (false !== strpos($attribute, '.')) {
27 27
                 [$perm, $op] = explode('.', $attribute);
28 28
 
29
-                return $this->resolver->isValidOperation('parts_' . $perm, $op);
29
+                return $this->resolver->isValidOperation('parts_'.$perm, $op);
30 30
             }
31 31
 
32 32
             return $this->resolver->isValidOperation('parts', $attribute);
Please login to merge, or discard this patch.
src/Security/Voter/StructureVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     protected function supports($attribute, $subject)
58 58
     {
59
-        if(is_object($subject)) {
59
+        if (is_object($subject)) {
60 60
             $permission_name = $this->instanceToPermissionName($subject);
61 61
             //If permission name is null, then the subject is not supported
62 62
             return ($permission_name !== null) && $this->resolver->isValidOperation($permission_name, $attribute);
Please login to merge, or discard this patch.