@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $this->repository->update($dedicatedServer, $attributes); |
127 | 127 | |
128 | 128 | return redirect()->route('admin.dedicated_servers.index') |
129 | - ->with('success', __('dedicated_servers.update_success_msg')); |
|
129 | + ->with('success', __('dedicated_servers.update_success_msg')); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -140,6 +140,6 @@ discard block |
||
140 | 140 | $this->repository->destroy($dedicatedServer); |
141 | 141 | |
142 | 142 | return redirect()->route('admin.dedicated_servers.index') |
143 | - ->with('success', __('dedicated_servers.delete_success_msg')); |
|
143 | + ->with('success', __('dedicated_servers.delete_success_msg')); |
|
144 | 144 | } |
145 | 145 | } |
@@ -94,6 +94,6 @@ |
||
94 | 94 | $this->repository->destroy($clientCertificate); |
95 | 95 | |
96 | 96 | return redirect()->route('admin.client_certificates.index') |
97 | - ->with('success', __('client_certificates.delete_success_msg')); |
|
97 | + ->with('success', __('client_certificates.delete_success_msg')); |
|
98 | 98 | } |
99 | 99 | } |
100 | 100 | \ No newline at end of file |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | $privateKey = (new RSA())->createKey(self::PRIVATE_KEY_BITS)['privatekey']; |
41 | 41 | |
42 | - $privateKeyInfo = PrivateKeyInfo::fromPEM(PEM::fromString( $privateKey)); |
|
42 | + $privateKeyInfo = PrivateKeyInfo::fromPEM(PEM::fromString($privateKey)); |
|
43 | 43 | |
44 | 44 | $publicKeyInfo = $privateKeyInfo->publicKeyInfo(); |
45 | 45 |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | return false; |
78 | 78 | } |
79 | 79 | |
80 | - $lastProcessCheck = Carbon::createFromFormat('Y-m-d H:i:s' , $this->last_process_check)->timestamp; |
|
80 | + $lastProcessCheck = Carbon::createFromFormat('Y-m-d H:i:s', $this->last_process_check)->timestamp; |
|
81 | 81 | |
82 | 82 | if ($this->process_active && $lastProcessCheck >= Carbon::now()->timestamp - self::TIME_EXPIRE_PROCESS_CHECK) { |
83 | 83 | return true; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | foreach ($this->gameMod->vars as $var) { |
166 | 166 | $varname = $var['var']; |
167 | - $aliases[ $varname ] = isset($this->vars[$varname]) |
|
167 | + $aliases[$varname] = isset($this->vars[$varname]) |
|
168 | 168 | ? $this->vars[$varname] |
169 | 169 | : $var['default']; |
170 | 170 | } |
@@ -19,7 +19,7 @@ |
||
19 | 19 | ] |
20 | 20 | ); |
21 | 21 | |
22 | - $body = json_decode((string)$response->getBody()); |
|
22 | + $body = json_decode((string) $response->getBody()); |
|
23 | 23 | return $body->success; |
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | $addInstallTask = false; |
46 | 46 | if (isset($attributes['install'])) { |
47 | - $attributes['installed'] = ! $attributes['install']; |
|
47 | + $attributes['installed'] = !$attributes['install']; |
|
48 | 48 | $addInstallTask = true; |
49 | 49 | |
50 | 50 | unset($attributes['install']); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | { |
118 | 118 | return $this->model->select(['id', 'name', 'server_ip', 'server_port', 'game_id', 'game_mod_id']) |
119 | 119 | ->with(['game' => function($query) { |
120 | - $query->select('code','name'); |
|
120 | + $query->select('code', 'name'); |
|
121 | 121 | }]) |
122 | 122 | ->where('name', 'LIKE', '%' . $query . '%') |
123 | 123 | ->get(); |
@@ -129,9 +129,9 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function update(Server $server, array $attributes) |
131 | 131 | { |
132 | - $attributes['enabled'] = (bool)array_key_exists('enabled', $attributes); |
|
133 | - $attributes['blocked'] = (bool)array_key_exists('blocked', $attributes); |
|
134 | - $attributes['installed'] = (bool)array_key_exists('installed', $attributes); |
|
132 | + $attributes['enabled'] = (bool) array_key_exists('enabled', $attributes); |
|
133 | + $attributes['blocked'] = (bool) array_key_exists('blocked', $attributes); |
|
134 | + $attributes['installed'] = (bool) array_key_exists('installed', $attributes); |
|
135 | 135 | |
136 | 136 | // Fix path. Remove absolute dedicated server path |
137 | 137 | $attributes['dir'] = $this->fixPath($attributes['dir'], $server->dedicatedServer->work_path); |
@@ -25,11 +25,11 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | if ($res->getStatusCode() == Response::HTTP_OK) { |
28 | - $lines = explode("\n", $res->getBody()->getContents()); |
|
29 | - $parts = explode(': ', $lines[0]); |
|
30 | - $latest = $parts[1]; |
|
28 | + $lines = explode("\n", $res->getBody()->getContents()); |
|
29 | + $parts = explode(': ', $lines[0]); |
|
30 | + $latest = $parts[1]; |
|
31 | 31 | |
32 | - return $latest; |
|
32 | + return $latest; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | // GitHub |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function index() |
37 | 37 | { |
38 | - return view('admin.games.list',[ |
|
38 | + return view('admin.games.list', [ |
|
39 | 39 | 'games' => $this->repository->allWith('mods') |
40 | 40 | ]); |
41 | 41 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $portRules = ['nullable', 'numeric', 'digits_between:1,65535', |
15 | 15 | Rule::unique('servers', 'server_port') |
16 | 16 | ->ignore($this->route('server')) |
17 | - ->where(function ($query) { |
|
17 | + ->where(function($query) { |
|
18 | 18 | return $query |
19 | 19 | ->where('ds_id', $this->ds_id) |
20 | 20 | ->where('server_ip', $this->server_ip) |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | }), |
23 | 23 | Rule::unique('servers', 'query_port') |
24 | 24 | ->ignore($this->route('server')) |
25 | - ->where(function ($query) { |
|
25 | + ->where(function($query) { |
|
26 | 26 | return $query |
27 | 27 | ->where('ds_id', $this->ds_id) |
28 | 28 | ->where('server_ip', $this->server_ip) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | }), |
31 | 31 | Rule::unique('servers', 'rcon_port') |
32 | 32 | ->ignore($this->route('server')) |
33 | - ->where(function ($query) { |
|
33 | + ->where(function($query) { |
|
34 | 34 | return $query |
35 | 35 | ->where('ds_id', $this->ds_id) |
36 | 36 | ->where('server_ip', $this->server_ip) |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | 'dir' => ['required', 'string', Rule::unique('servers', 'dir') |
56 | 56 | ->ignore($this->route('server')) |
57 | - ->where(function ($query) { |
|
57 | + ->where(function($query) { |
|
58 | 58 | return $query->where('ds_id', $this->ds_id); |
59 | 59 | })] |
60 | 60 | ]; |