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 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * Check if any operations are allowed for a Crud Panel. Return false if not. |
54 | 54 | */ |
55 | - public function hasAccessToAny(array|string $operation_array, ?Model $entry = null): bool |
|
55 | + public function hasAccessToAny(array | string $operation_array, ?Model $entry = null): bool |
|
56 | 56 | { |
57 | 57 | foreach ((array) $operation_array as $key => $operation) { |
58 | 58 | if ($this->hasAccess($operation, $entry) == true) { |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | /** |
67 | 67 | * Check if all operations are allowed for a Crud Panel. Return false if not. |
68 | 68 | */ |
69 | - public function hasAccessToAll(array|string $operation_array, ?Model $entry = null): bool |
|
69 | + public function hasAccessToAll(array | string $operation_array, ?Model $entry = null): bool |
|
70 | 70 | { |
71 | 71 | foreach ((array) $operation_array as $key => $operation) { |
72 | - if (! $this->hasAccess($operation, $entry)) { |
|
72 | + if (!$this->hasAccess($operation, $entry)) { |
|
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function hasAccessOrFail(string $operation, ?Model $entry = null): bool |
86 | 86 | { |
87 | - if (! $this->hasAccess($operation, $entry)) { |
|
87 | + if (!$this->hasAccess($operation, $entry)) { |
|
88 | 88 | throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $operation])); |
89 | 89 | } |
90 | 90 | |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Get an operation's access condition, if set. A condition |
96 | 96 | * can be anything, but usually a boolean or a callable. |
97 | 97 | */ |
98 | - public function getAccessCondition(string $operation): bool|callable|null |
|
98 | + public function getAccessCondition(string $operation): bool | callable | null |
|
99 | 99 | { |
100 | 100 | return $this->get($operation.'.access'); |
101 | 101 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** |
104 | 104 | * Set the condition under which an operation is allowed for a Crud Panel. |
105 | 105 | */ |
106 | - public function setAccessCondition(array|string $operation, bool|callable|null $condition): void |
|
106 | + public function setAccessCondition(array | string $operation, bool | callable | null $condition): void |
|
107 | 107 | { |
108 | 108 | foreach ((array) $operation as $op) { |
109 | 109 | $this->set($op.'.access', $condition); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * Allow access only to operations in the array. |
132 | 132 | * By denying access to all other operations. |
133 | 133 | */ |
134 | - public function allowAccessOnlyTo(array|string $operation): void |
|
134 | + public function allowAccessOnlyTo(array | string $operation): void |
|
135 | 135 | { |
136 | 136 | $this->denyAllAccess(); |
137 | 137 | $this->allowAccess($operation); |