Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -132,25 +132,6 @@ class ServersController extends Controller
|
|||
|
||||
/**
|
||||
* ServersController constructor.
|
||||
*
|
||||
* @param \Prologue\Alerts\AlertsMessageBag $alert
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
|
||||
* @param \Illuminate\Contracts\Config\Repository $config
|
||||
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonServerRepository
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $databaseRepository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\DatabaseHostRepository $databaseHostRepository
|
||||
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
|
||||
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
|
||||
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\MountRepository $mountRepository
|
||||
* @param \Pterodactyl\Contracts\Repository\NestRepositoryInterface $nestRepository
|
||||
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $serverConfigurationStructureService
|
||||
* @param \Pterodactyl\Services\Servers\StartupModificationService $startupModificationService
|
||||
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
|
||||
*/
|
||||
public function __construct(
|
||||
AlertsMessageBag $alert,
|
||||
|
@ -195,8 +176,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Update the details for a server.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
@ -216,7 +195,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Toggles the install status for a server.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -230,7 +208,7 @@ class ServersController extends Controller
|
|||
}
|
||||
|
||||
$this->repository->update($server->id, [
|
||||
'installed' => ! $server->installed,
|
||||
'installed' => !$server->installed,
|
||||
], true, true);
|
||||
|
||||
$this->alert->success(trans('admin/server.alerts.install_toggled'))->flash();
|
||||
|
@ -241,7 +219,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Reinstalls the server with the currently assigned service.
|
||||
*
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -259,8 +236,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Manage the suspension status for a server.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -280,8 +255,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Update the build configuration for a server.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -308,8 +281,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Start the server deletion process.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -326,8 +297,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Update the startup command as well as variables.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
|
@ -335,7 +304,7 @@ class ServersController extends Controller
|
|||
public function saveStartup(Request $request, Server $server)
|
||||
{
|
||||
$data = $request->except('_token');
|
||||
if (! empty($data['custom_docker_image'])) {
|
||||
if (!empty($data['custom_docker_image'])) {
|
||||
$data['docker_image'] = $data['custom_docker_image'];
|
||||
unset($data['custom_docker_image']);
|
||||
}
|
||||
|
@ -356,8 +325,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Creates a new database assigned to a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Admin\Servers\Databases\StoreServerDatabaseRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
|
@ -377,8 +344,8 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Resets the database password for a specific database on this server.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $server
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
|
@ -400,6 +367,7 @@ class ServersController extends Controller
|
|||
*
|
||||
* @param int $server
|
||||
* @param int $database
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Exception
|
||||
|
@ -420,15 +388,13 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Add a mount to a server.
|
||||
*
|
||||
* @param Server $server
|
||||
* @param \Pterodactyl\Models\Mount $mount
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function addMount(Server $server, Mount $mount)
|
||||
{
|
||||
$mountServer = (new MountServer)->forceFill([
|
||||
$mountServer = (new MountServer())->forceFill([
|
||||
'mount_id' => $mount->id,
|
||||
'server_id' => $server->id,
|
||||
]);
|
||||
|
@ -443,8 +409,6 @@ class ServersController extends Controller
|
|||
/**
|
||||
* Remove a mount from a server.
|
||||
*
|
||||
* @param Server $server
|
||||
* @param \Pterodactyl\Models\Mount $mount
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function deleteMount(Server $server, Mount $mount)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue