Skip to content

Commit 5bf2e26

Browse files
authored
Apply fixes from StyleCI (pterodactyl#335)
1 parent 3355554 commit 5bf2e26

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

app/Http/Controllers/Admin/ServersController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function viewDatabase(Request $request, $id)
213213

214214
return view('admin.servers.view.database', [
215215
'hosts' => Models\DatabaseServer::all(),
216-
'server' => $server
216+
'server' => $server,
217217
]);
218218
}
219219

@@ -493,7 +493,7 @@ public function saveStartup(Request $request, $id)
493493
$repo->updateStartup($id, $request->except('_token'), true);
494494

495495
Alert::success('Startup variables were successfully modified and assigned for this server.')->flash();
496-
} catch(DisplayException $ex) {
496+
} catch (DisplayException $ex) {
497497
Alert::danger($ex->getMessage())->flash();
498498
} catch (TransferException $ex) {
499499
Log::warning($ex);
@@ -522,7 +522,7 @@ public function newDatabase(Request $request, $id)
522522
Alert::success('A new database was assigned to this server successfully.')->flash();
523523
} catch (DisplayValidationException $ex) {
524524
return redirect()->route('admin.servers.view.database', $id)->withInput()->withErrors(json_decode($ex->getMessage()))->withInput();
525-
} catch(DisplayException $ex) {
525+
} catch (DisplayException $ex) {
526526
Alert::danger($ex->getMessage())->flash();
527527
} catch (\Exception $ex) {
528528
Log::error($ex);

app/Repositories/DatabaseRepository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ public function create($server, $data)
114114
DB::connection('dynamic')->statement(sprintf('DROP DATABASE IF EXISTS `%s`', $database->database));
115115
DB::connection('dynamic')->statement(sprintf('DROP USER IF EXISTS `%s`@`%s`', $database->username, $database->remote));
116116
DB::connection('dynamic')->statement('FLUSH PRIVILEGES');
117-
} catch (\Exception $ex) {}
117+
} catch (\Exception $ex) {
118+
}
118119

119120
DB::rollBack();
120121
throw $ex;

app/Repositories/ServerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ public function updateStartup($id, array $data, $admin = false)
624624
}
625625

626626
if ($server->option->variables) {
627-
foreach($server->option->variables as &$variable) {
627+
foreach ($server->option->variables as &$variable) {
628628
$set = isset($data['env_' . $variable->id]);
629629

630630
// Variable is required but was not passed into the function.

0 commit comments

Comments
 (0)