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 | /** |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | if (is_callable($condition)) { |
42 | 42 | // supply the current entry, if $entry is missing |
43 | - if (! $entry && $this->getCurrentEntry()) { |
|
43 | + if (!$entry && $this->getCurrentEntry()) { |
|
44 | 44 | $entry = $this->getCurrentEntry(); |
45 | 45 | } // this also makes sure the entry is null when missing |
46 | 46 | |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | /** |
54 | 54 | * Check if any operations are allowed for a Crud Panel. Return false if not. |
55 | 55 | */ |
56 | - public function hasAccessToAny(array|string $operation_array, ?Model $entry = null): bool |
|
56 | + public function hasAccessToAny(array | string $operation_array, ?Model $entry = null): bool |
|
57 | 57 | { |
58 | 58 | foreach ((array) $operation_array as $key => $operation) { |
59 | 59 | if ($this->hasAccess($operation, $entry) == true) { |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | /** |
68 | 68 | * Check if all operations are allowed for a Crud Panel. Return false if not. |
69 | 69 | */ |
70 | - public function hasAccessToAll(array|string $operation_array, ?Model $entry = null): bool |
|
70 | + public function hasAccessToAll(array | string $operation_array, ?Model $entry = null): bool |
|
71 | 71 | { |
72 | 72 | foreach ((array) $operation_array as $key => $operation) { |
73 | - if (! $this->hasAccess($operation, $entry)) { |
|
73 | + if (!$this->hasAccess($operation, $entry)) { |
|
74 | 74 | return false; |
75 | 75 | } |
76 | 76 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function hasAccessOrFail(string $operation, ?Model $entry = null): bool |
87 | 87 | { |
88 | - if (! $this->hasAccess($operation, $entry)) { |
|
88 | + if (!$this->hasAccess($operation, $entry)) { |
|
89 | 89 | throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $operation])); |
90 | 90 | } |
91 | 91 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * Get an operation's access condition, if set. A condition |
97 | 97 | * can be anything, but usually a boolean or a callable. |
98 | 98 | */ |
99 | - public function getAccessCondition(string $operation): bool|callable|null |
|
99 | + public function getAccessCondition(string $operation): bool | callable | null |
|
100 | 100 | { |
101 | 101 | return $this->get($operation.'.access'); |
102 | 102 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * Set the condition under which an operation is allowed for a Crud Panel. |
106 | 106 | */ |
107 | - public function setAccessCondition(array|string $operation, bool|callable|null $condition): void |
|
107 | + public function setAccessCondition(array | string $operation, bool | callable | null $condition): void |
|
108 | 108 | { |
109 | 109 | foreach ((array) $operation as $op) { |
110 | 110 | $this->set($op.'.access', $condition); |