@@ -314,7 +314,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -26,7 +26,7 @@ |
||
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); |
@@ -56,7 +56,7 @@ |
||
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); |