@@ -47,7 +47,7 @@ |
||
47 | 47 | |
48 | 48 | $this->gdaemonFiles->get($fullPath, $destination); |
49 | 49 | |
50 | - $zip->addFile($destination, "daemon_logs/". $fileName); |
|
50 | + $zip->addFile($destination, "daemon_logs/" . $fileName); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $zip->close(); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | ) { |
36 | 36 | parent::__construct(); |
37 | 37 | |
38 | - $this->repository = $repository; |
|
38 | + $this->repository = $repository; |
|
39 | 39 | $this->debugService = $downloadDebugService; |
40 | 40 | } |
41 | 41 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public function values(): array |
20 | 20 | { |
21 | - return array_map(function ($v) { |
|
21 | + return array_map(function($v) { |
|
22 | 22 | return Arr::only($v, ['id', 'installed', 'process_active', 'last_process_check']); |
23 | 23 | }, $this->json()->all()); |
24 | 24 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | public function boot(): void |
19 | 19 | { |
20 | - $this->app->bind(SerializerInterface::class, function () { |
|
20 | + $this->app->bind(SerializerInterface::class, function() { |
|
21 | 21 | |
22 | 22 | return new Serializer( |
23 | 23 | [new ObjectNormalizer(null, new CamelCaseToSnakeCaseNameConverter())], |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function store(array $attributes) |
86 | 86 | { |
87 | - $attributes['ip'] = array_filter($attributes['ip'], function ($value) { |
|
87 | + $attributes['ip'] = array_filter($attributes['ip'], function($value) { |
|
88 | 88 | return !empty($value); |
89 | 89 | }); |
90 | 90 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function update(DedicatedServer $dedicatedServer, array $attributes): void |
134 | 134 | { |
135 | - $attributes['ip'] = array_filter($attributes['ip'], function ($value) { |
|
135 | + $attributes['ip'] = array_filter($attributes['ip'], function($value) { |
|
136 | 136 | return !empty($value); |
137 | 137 | }); |
138 | 138 |
@@ -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' => ['nullable', '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 | }), ], |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | public function index(DedicatedServer $dedicatedServer): JsonResponse |
30 | 30 | { |
31 | - $servers = QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id)) |
|
31 | + $servers = QueryBuilder::for (Server::where('ds_id', '=', $dedicatedServer->id)) |
|
32 | 32 | ->allowedFilters('id') |
33 | 33 | ->with('dedicatedServer') |
34 | 34 | ->with('game') |
@@ -28,13 +28,14 @@ |
||
28 | 28 | |
29 | 29 | public function index(DedicatedServer $dedicatedServer): JsonResponse |
30 | 30 | { |
31 | - $servers = QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id)) |
|
32 | - ->allowedFilters('id') |
|
31 | + $servers = QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id)) { |
|
32 | + ->allowedFilters('id') |
|
33 | 33 | ->with('dedicatedServer') |
34 | 34 | ->with('game') |
35 | 35 | ->with('gameMod') |
36 | 36 | ->with('settings') |
37 | 37 | ->get(); |
38 | + } |
|
38 | 39 | |
39 | 40 | $serversResponse = []; |
40 | 41 |
@@ -212,7 +212,7 @@ |
||
212 | 212 | |
213 | 213 | if ($this->gameMod !== null && is_array($this->gameMod->vars)) { |
214 | 214 | foreach ($this->gameMod->vars as $var) { |
215 | - if(!isset($var['var'])) { |
|
215 | + if (!isset($var['var'])) { |
|
216 | 216 | continue; |
217 | 217 | } |
218 | 218 | $varname = $var['var']; |
@@ -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 | $q = $query |
17 | 17 | ->where('ds_id', $this->ds_id) |
18 | 18 | ->where('server_ip', $this->server_ip) |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | }), |
27 | 27 | Rule::unique('servers', 'query_port') |
28 | 28 | ->ignore($this->route('server')) |
29 | - ->where(function ($query) { |
|
29 | + ->where(function($query) { |
|
30 | 30 | $q = $query |
31 | 31 | ->where('ds_id', $this->ds_id) |
32 | 32 | ->where('server_ip', $this->server_ip) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | }), |
41 | 41 | Rule::unique('servers', 'rcon_port') |
42 | 42 | ->ignore($this->route('server')) |
43 | - ->where(function ($query) { |
|
43 | + ->where(function($query) { |
|
44 | 44 | $q = $query |
45 | 45 | ->where('ds_id', $this->ds_id) |
46 | 46 | ->where('server_ip', $this->server_ip) |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | 'dir' => ['nullable', 'string', Rule::unique('servers', 'dir') |
73 | 73 | ->ignore($this->route('server')) |
74 | - ->where(function ($query) { |
|
74 | + ->where(function($query) { |
|
75 | 75 | return $query->where('ds_id', $this->ds_id) |
76 | 76 | ->whereNull('deleted_at'); |
77 | 77 | }), ], |