Passed
Push — develop ( bf9a88...4924ce )
by Nikita
10:01
created
app/Repositories/ServerRepository.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'];
Please login to merge, or discard this patch.
app/Http/Controllers/API/ServersController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
     public function getList()
280 280
     {
281
-        return QueryBuilder::for(Server::class)
281
+        return QueryBuilder::for (Server::class)
282 282
             ->allowedFilters('ds_id')
283 283
             ->allowedAppends('full_path')
284 284
             ->get([
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         if (Auth::user()->can('admin roles & permissions')) {
311 311
             $extraMessage = $this->getDocMessage($exception);
312 312
         } else {
313
-            $extraMessage = (string)__('main.common_admin_error');
313
+            $extraMessage = (string) __('main.common_admin_error');
314 314
         }
315 315
 
316 316
         return $this->makeErrorResponse($exception->getMessage() . $extraMessage);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
 
279 279
     public function getList()
280 280
     {
281
-        return QueryBuilder::for(Server::class)
282
-            ->allowedFilters('ds_id')
281
+        return QueryBuilder::for(Server::class) {
282
+                    ->allowedFilters('ds_id')
283 283
             ->allowedAppends('full_path')
284 284
             ->get([
285 285
                 'id',
@@ -298,6 +298,7 @@  discard block
 block discarded – undo
298 298
                 'rcon_port',
299 299
                 'dir',
300 300
             ]);
301
+        }
301 302
     }
302 303
 
303 304
     /**
Please login to merge, or discard this patch.
app/Http/Controllers/GdaemonAPI/TasksController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function index(DedicatedServer $dedicatedServer)
34 34
     {
35
-        return QueryBuilder::for(GdaemonTask::where('dedicated_server_id', $dedicatedServer->id))
35
+        return QueryBuilder::for (GdaemonTask::where('dedicated_server_id', $dedicatedServer->id))
36 36
             ->allowedFilters(['status'])
37 37
             ->allowedAppends(['status_num'])
38 38
             ->get();
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,10 +32,11 @@
 block discarded – undo
32 32
      */
33 33
     public function index(DedicatedServer $dedicatedServer)
34 34
     {
35
-        return QueryBuilder::for(GdaemonTask::where('dedicated_server_id', $dedicatedServer->id))
36
-            ->allowedFilters(['status'])
35
+        return QueryBuilder::for(GdaemonTask::where('dedicated_server_id', $dedicatedServer->id)) {
36
+                    ->allowedFilters(['status'])
37 37
             ->allowedAppends(['status_num'])
38 38
             ->get();
39
+        }
39 40
     }
40 41
 
41 42
     public function update(GdaemonTask $gdaemonTask): JsonResponse
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $latestVersion = Cache::remember(
46 46
             'latestVersion',
47 47
             self::LATEST_VERSION_CACHE_TTL_IN_SECONDS,
48
-            static function () use ($infoService) {
48
+            static function() use ($infoService) {
49 49
                 return $infoService->latestRelease();
50 50
             }
51 51
         );
Please login to merge, or discard this patch.
app/Services/Daemon/DebugService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/DedicatedServersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Controllers/GdaemonAPI/ServersController.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function index(DedicatedServer $dedicatedServer): JsonResponse
29 29
     {
30 30
         return response()->json(
31
-            QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id))
31
+            QueryBuilder::for (Server::where('ds_id', '=', $dedicatedServer->id))
32 32
             ->allowedFilters('id')
33 33
             ->with('game')
34 34
             ->with('gameMod')
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,13 +28,14 @@
 block discarded – undo
28 28
     public function index(DedicatedServer $dedicatedServer): JsonResponse
29 29
     {
30 30
         return response()->json(
31
-            QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id))
32
-            ->allowedFilters('id')
31
+            QueryBuilder::for(Server::where('ds_id', '=', $dedicatedServer->id)) {
32
+                        ->allowedFilters('id')
33 33
             ->with('game')
34 34
             ->with('gameMod')
35 35
             ->with('settings')
36 36
             ->get()
37 37
         );
38
+            }
38 39
     }
39 40
 
40 41
     public function server(Server $server): JsonResponse
Please login to merge, or discard this patch.
app/Http/Requests/GdaemonAPI/JsonServerBulkRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.