We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | /** |
11 | 11 | * Set an operation as having access using the Settings API. |
12 | 12 | */ |
13 | - public function allowAccess(array|string $operation): bool |
|
13 | + public function allowAccess(array | string $operation): bool |
|
14 | 14 | { |
15 | 15 | foreach ((array) $operation as $op) { |
16 | 16 | $this->set($op.'.access', true); |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Disable the access to a certain operation, or the current one. |
24 | 24 | */ |
25 | - public function denyAccess(array|string $operation): bool |
|
25 | + public function denyAccess(array | string $operation): bool |
|
26 | 26 | { |
27 | 27 | foreach ((array) $operation as $op) { |
28 | 28 | $this->set($op.'.access', false); |
29 | 29 | } |
30 | 30 | |
31 | - return ! $this->hasAccessToAny($operation); |
|
31 | + return !$this->hasAccessToAny($operation); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | /** |
51 | 51 | * Check if any operations are allowed for a Crud Panel. Return false if not. |
52 | 52 | */ |
53 | - public function hasAccessToAny(array|string $operation_array, ?Model $entry = null): bool |
|
53 | + public function hasAccessToAny(array | string $operation_array, ?Model $entry = null): bool |
|
54 | 54 | { |
55 | 55 | foreach ((array) $operation_array as $key => $operation) { |
56 | 56 | if ($this->hasAccess($operation, $entry) == true) { |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Check if all operations are allowed for a Crud Panel. Return false if not. |
66 | 66 | */ |
67 | - public function hasAccessToAll(array|string $operation_array, ?Model $entry = null): bool |
|
67 | + public function hasAccessToAll(array | string $operation_array, ?Model $entry = null): bool |
|
68 | 68 | { |
69 | 69 | foreach ((array) $operation_array as $key => $operation) { |
70 | - if (! $this->hasAccess($operation, $entry)) { |
|
70 | + if (!$this->hasAccess($operation, $entry)) { |
|
71 | 71 | return false; |
72 | 72 | } |
73 | 73 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function hasAccessOrFail(string $operation, ?Model $entry = null): bool |
84 | 84 | { |
85 | - if (! $this->hasAccess($operation, $entry)) { |
|
85 | + if (!$this->hasAccess($operation, $entry)) { |
|
86 | 86 | throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $operation])); |
87 | 87 | } |
88 | 88 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * Get an operation's access condition, if set. A condition |
94 | 94 | * can be anything, but usually a boolean or a callable. |
95 | 95 | */ |
96 | - public function getAccessCondition(string $operation): bool|callable|null |
|
96 | + public function getAccessCondition(string $operation): bool | callable | null |
|
97 | 97 | { |
98 | 98 | return $this->get($operation.'.access'); |
99 | 99 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | /** |
102 | 102 | * Set the condition under which an operation is allowed for a Crud Panel. |
103 | 103 | */ |
104 | - public function setAccessCondition(array|string $operation, bool|callable|null $condition): void |
|
104 | + public function setAccessCondition(array | string $operation, bool | callable | null $condition): void |
|
105 | 105 | { |
106 | 106 | foreach ((array) $operation as $op) { |
107 | 107 | $this->set($op.'.access', $condition); |