| @@ -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); | 
| @@ -32,7 +32,7 @@ | ||
| 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(); | 
| @@ -32,10 +32,11 @@ | ||
| 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 |