@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function revokeClientTokens($client): bool |
29 | 29 | { |
30 | - $client = ! filter_var($client, FILTER_VALIDATE_INT) ? $client : $this->find($client); |
|
30 | + $client = !filter_var($client, FILTER_VALIDATE_INT) ? $client : $this->find($client); |
|
31 | 31 | $client->tokens()->update(['revoked' => true]); |
32 | 32 | |
33 | 33 | return true; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function toArray($request) |
18 | 18 | { |
19 | - if (! $this->resource) { |
|
19 | + if (!$this->resource) { |
|
20 | 20 | return []; |
21 | 21 | } |
22 | 22 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function detachPermissions(mixed $role): bool |
28 | 28 | { |
29 | - $role = ! filter_var($role, FILTER_VALIDATE_INT) ? $role : $this->find($role); |
|
29 | + $role = !filter_var($role, FILTER_VALIDATE_INT) ? $role : $this->find($role); |
|
30 | 30 | $role->permissions()->detach(); |
31 | 31 | |
32 | 32 | return true; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public function attachPermissions(mixed $role, array $permissionIds): bool |
43 | 43 | { |
44 | - $role = ! filter_var($role, FILTER_VALIDATE_INT) ? $role : $this->find($role); |
|
44 | + $role = !filter_var($role, FILTER_VALIDATE_INT) ? $role : $this->find($role); |
|
45 | 45 | $role->permissions()->attach($permissionIds); |
46 | 46 | |
47 | 47 | return true; |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function toArray($request) |
16 | 16 | { |
17 | - if (! $this->resource) { |
|
17 | + if (!$this->resource) { |
|
18 | 18 | return []; |
19 | 19 | } |
20 | 20 |
@@ -47,9 +47,9 @@ |
||
47 | 47 | /** |
48 | 48 | * Check report existance and permission. |
49 | 49 | */ |
50 | - if (! $report) { |
|
50 | + if (!$report) { |
|
51 | 51 | Errors::notFound('report'); |
52 | - } elseif (! $skipPermission && ! $this->userService->can($report->view_name, 'report')) { |
|
52 | + } elseif (!$skipPermission && !$this->userService->can($report->view_name, 'report')) { |
|
53 | 53 | Errors::noPermissions(); |
54 | 54 | } |
55 | 55 |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function renderReport(mixed $report, array $conditions = [], int $perPage = 0): mixed |
32 | 32 | { |
33 | - $report = ! filter_var($report, FILTER_VALIDATE_INT) ? $report : $this->find($report); |
|
33 | + $report = !filter_var($report, FILTER_VALIDATE_INT) ? $report : $this->find($report); |
|
34 | 34 | /** |
35 | 35 | * Fetch data from the report based on the given conditions. |
36 | 36 | */ |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function toArray($request) |
23 | 23 | { |
24 | - if (! $this->resource) { |
|
24 | + if (!$this->resource) { |
|
25 | 25 | return []; |
26 | 26 | } |
27 | 27 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $permission = $routeActions[1]; |
58 | 58 | |
59 | 59 | $this->auth->shouldUse('api'); |
60 | - if (! in_array($permission, $skipLoginCheck)) { |
|
60 | + if (!in_array($permission, $skipLoginCheck)) { |
|
61 | 61 | $this->authMiddleware->handle($request, function ($request) use ($modelName, $skipPermissionCheck, $permission) { |
62 | 62 | $user = $this->auth->user(); |
63 | 63 | $isPasswordClient = $user->token() ? $user->token()->client->password_client : false; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | if ($isPasswordClient && (in_array($permission, $skipPermissionCheck) || $this->userService->can($permission, $modelName))) { |
70 | - } elseif (! $isPasswordClient && $user->tokenCan($modelName.'-'.$permission)) { |
|
70 | + } elseif (!$isPasswordClient && $user->tokenCan($modelName.'-'.$permission)) { |
|
71 | 71 | } else { |
72 | 72 | Errors::noPermissions(); |
73 | 73 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | return $values; |
41 | 41 | } |
42 | 42 | |
43 | - if (! $primaryLocale || ! is_object($values) || ! property_exists($values, $primaryLocale)) { |
|
43 | + if (!$primaryLocale || !is_object($values) || !property_exists($values, $primaryLocale)) { |
|
44 | 44 | return $values ? (isset($values->$fallbackLocale) ? $values->$fallbackLocale : $values) : ''; |
45 | 45 | } |
46 | 46 |