@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function boot(): void |
18 | 18 | { |
19 | - Storage::extend('gameap', function ($app, $config) { |
|
19 | + Storage::extend('gameap', function($app, $config) { |
|
20 | 20 | return new Filesystem(new GameapAdapter($config)); |
21 | 21 | }); |
22 | 22 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function boot(): void |
16 | 16 | { |
17 | - view()->composer('*', function (): void { |
|
17 | + view()->composer('*', function(): void { |
|
18 | 18 | Form::component( |
19 | 19 | 'bsInput', |
20 | 20 | 'components.form.input', |
@@ -33,7 +33,7 @@ |
||
33 | 33 | if (!Collection::hasMacro('paginate')) { |
34 | 34 | Collection::macro( |
35 | 35 | 'paginate', |
36 | - function ($perPage = 15, $page = null, $options = []) { |
|
36 | + function($perPage = 15, $page = null, $options = []) { |
|
37 | 37 | $page = $page ?: (Paginator::resolveCurrentPage() ?: 1); |
38 | 38 | return (new LengthAwarePaginator( |
39 | 39 | $this->forPage($page, $perPage), |
@@ -20,7 +20,7 @@ |
||
20 | 20 | ] |
21 | 21 | ); |
22 | 22 | |
23 | - $body = json_decode((string)$response->getBody()); |
|
23 | + $body = json_decode((string) $response->getBody()); |
|
24 | 24 | return $body->success; |
25 | 25 | } |
26 | 26 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | $portRules = ['nullable', 'numeric', 'digits_between:1,65535', |
13 | 13 | Rule::unique('servers', 'server_port') |
14 | 14 | ->ignore($this->route('server')) |
15 | - ->where(function ($query) { |
|
15 | + ->where(function($query) { |
|
16 | 16 | return $query |
17 | 17 | ->where('ds_id', $this->ds_id) |
18 | 18 | ->where('server_ip', $this->server_ip) |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | }), |
21 | 21 | Rule::unique('servers', 'query_port') |
22 | 22 | ->ignore($this->route('server')) |
23 | - ->where(function ($query) { |
|
23 | + ->where(function($query) { |
|
24 | 24 | return $query |
25 | 25 | ->where('ds_id', $this->ds_id) |
26 | 26 | ->where('server_ip', $this->server_ip) |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | }), |
29 | 29 | Rule::unique('servers', 'rcon_port') |
30 | 30 | ->ignore($this->route('server')) |
31 | - ->where(function ($query) { |
|
31 | + ->where(function($query) { |
|
32 | 32 | return $query |
33 | 33 | ->where('ds_id', $this->ds_id) |
34 | 34 | ->where('server_ip', $this->server_ip) |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | 'dir' => ['required', 'string', Rule::unique('servers', 'dir') |
54 | 54 | ->ignore($this->route('server')) |
55 | - ->where(function ($query) { |
|
55 | + ->where(function($query) { |
|
56 | 56 | return $query->where('ds_id', $this->ds_id) |
57 | 57 | ->whereNull('deleted_at'); |
58 | 58 | }), ], |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function store(DsStatsRequest $request, DedicatedServer $dedicatedServer) |
19 | 19 | { |
20 | - $values = array_map(function ($v) use ($dedicatedServer) { |
|
20 | + $values = array_map(function($v) use ($dedicatedServer) { |
|
21 | 21 | $arr = Arr::only($v, ['time', 'loa', 'ram', 'cpu', 'ifstat', 'ping', 'drvspace']); |
22 | 22 | $arr['dedicated_server_id'] = $dedicatedServer->id; |
23 | 23 | return $arr; |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function getList(DedicatedServer $dedicatedServer) |
20 | 20 | { |
21 | - return ServerTask::whereIn('server_id', function ($query) use ($dedicatedServer): void { |
|
21 | + return ServerTask::whereIn('server_id', function($query) use ($dedicatedServer): void { |
|
22 | 22 | $query->select('id') |
23 | 23 | ->from('servers') |
24 | 24 | ->where('ds_id', $dedicatedServer->id); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $user->servers()->sync($fields['servers']); |
61 | 61 | DB::table('permissions') |
62 | 62 | ->where('entity_id', '=', $user->id) |
63 | - ->whereIn('ability_id', function ($query) use ($fields): void { |
|
63 | + ->whereIn('ability_id', function($query) use ($fields): void { |
|
64 | 64 | $query->select('id') |
65 | 65 | ->from('abilities') |
66 | 66 | ->where('entity_type', '=', Server::class) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $user->servers()->detach(); |
72 | 72 | DB::table('permissions') |
73 | 73 | ->where('entity_id', '=', $user->id) |
74 | - ->whereIn('ability_id', function ($query): void { |
|
74 | + ->whereIn('ability_id', function($query): void { |
|
75 | 75 | $query->select('id') |
76 | 76 | ->from('abilities') |
77 | 77 | ->where('entity_type', '=', Server::class); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | $query = DB::table($serversTable) |
157 | 157 | ->selectRaw("{$serversTable}.*, {$gamesTable}.name as game_name") |
158 | - ->whereIn('game_id', function ($query) use ($engines, $serversTable, $gamesTable): void { |
|
158 | + ->whereIn('game_id', function($query) use ($engines, $serversTable, $gamesTable): void { |
|
159 | 159 | $query->select('code') |
160 | 160 | ->from($gamesTable) |
161 | 161 | ->whereIn('engine', $engines); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | public function search($query) |
182 | 182 | { |
183 | 183 | return $this->model->select(['id', 'name', 'server_ip', 'server_port', 'game_id', 'game_mod_id']) |
184 | - ->with(['game' => function ($query): void { |
|
184 | + ->with(['game' => function($query): void { |
|
185 | 185 | $query->select('code', 'name'); |
186 | 186 | }]) |
187 | 187 | ->where('name', 'LIKE', '%' . $query . '%') |
@@ -194,9 +194,9 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function update(Server $server, array $attributes): void |
196 | 196 | { |
197 | - $attributes['enabled'] = (bool)array_key_exists('enabled', $attributes); |
|
198 | - $attributes['blocked'] = (bool)array_key_exists('blocked', $attributes); |
|
199 | - $attributes['installed'] = (bool)array_key_exists('installed', $attributes); |
|
197 | + $attributes['enabled'] = (bool) array_key_exists('enabled', $attributes); |
|
198 | + $attributes['blocked'] = (bool) array_key_exists('blocked', $attributes); |
|
199 | + $attributes['installed'] = (bool) array_key_exists('installed', $attributes); |
|
200 | 200 | |
201 | 201 | if (isset($attributes['ds_id'])) { |
202 | 202 | $server->ds_id = $attributes['ds_id']; |