Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -35,10 +35,6 @@ class DatabaseController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* DatabaseController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Databases\DatabaseManagementService $databaseManagementService
|
||||
* @param \Pterodactyl\Services\Databases\DatabasePasswordService $databasePasswordService
|
||||
* @param \Pterodactyl\Contracts\Repository\DatabaseRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
DatabaseManagementService $databaseManagementService,
|
||||
|
@ -55,10 +51,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Return a listing of all databases currently available to a single
|
||||
* server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabasesRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return array
|
||||
*/
|
||||
public function index(GetServerDatabasesRequest $request, Server $server): array
|
||||
{
|
||||
|
@ -69,11 +61,6 @@ class DatabaseController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Return a single server database.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\GetServerDatabaseRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Database $database
|
||||
* @return array
|
||||
*/
|
||||
public function view(GetServerDatabaseRequest $request, Server $server, Database $database): array
|
||||
{
|
||||
|
@ -85,11 +72,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Reset the password for a specific server database.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\ServerDatabaseWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param \Pterodactyl\Models\Database $database
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function resetPassword(ServerDatabaseWriteRequest $request, Server $server, Database $database): JsonResponse
|
||||
|
@ -102,10 +84,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Create a new database on the Panel for a given server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\StoreServerDatabaseRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function store(StoreServerDatabaseRequest $request, Server $server): JsonResponse
|
||||
|
@ -128,9 +106,6 @@ class DatabaseController extends ApplicationApiController
|
|||
/**
|
||||
* Handle a request to delete a specific server database from the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\Databases\ServerDatabaseWriteRequest $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function delete(ServerDatabaseWriteRequest $request): Response
|
||||
|
|
|
@ -10,9 +10,6 @@ class ExternalServerController extends ApplicationApiController
|
|||
{
|
||||
/**
|
||||
* Retrieve a specific server from the database using its external ID.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetExternalServerRequest $request
|
||||
* @return array
|
||||
*/
|
||||
public function index(GetExternalServerRequest $request): array
|
||||
{
|
||||
|
|
|
@ -35,10 +35,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* ServerController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\ServerCreationService $creationService
|
||||
* @param \Pterodactyl\Services\Servers\ServerDeletionService $deletionService
|
||||
* @param \Pterodactyl\Contracts\Repository\ServerRepositoryInterface $repository
|
||||
*/
|
||||
public function __construct(
|
||||
ServerCreationService $creationService,
|
||||
|
@ -54,9 +50,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Return all of the servers that currently exist on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetServersRequest $request
|
||||
* @return array
|
||||
*/
|
||||
public function index(GetServersRequest $request): array
|
||||
{
|
||||
|
@ -73,9 +66,6 @@ class ServerController extends ApplicationApiController
|
|||
/**
|
||||
* Create a new server on the system.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\StoreServerRequest $request
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
|
@ -95,9 +85,6 @@ class ServerController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* Show a single server transformed for the application API.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\GetServerRequest $request
|
||||
* @return array
|
||||
*/
|
||||
public function view(GetServerRequest $request): array
|
||||
{
|
||||
|
@ -107,11 +94,6 @@ class ServerController extends ApplicationApiController
|
|||
}
|
||||
|
||||
/**
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @param string $force
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
*/
|
||||
public function delete(ServerWriteRequest $request, Server $server, string $force = ''): Response
|
||||
|
|
|
@ -24,9 +24,6 @@ class ServerDetailsController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* ServerDetailsController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\BuildModificationService $buildModificationService
|
||||
* @param \Pterodactyl\Services\Servers\DetailsModificationService $detailsModificationService
|
||||
*/
|
||||
public function __construct(
|
||||
BuildModificationService $buildModificationService,
|
||||
|
@ -41,9 +38,6 @@ class ServerDetailsController extends ApplicationApiController
|
|||
/**
|
||||
* Update the details for a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerDetailsRequest $request
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
@ -51,7 +45,8 @@ class ServerDetailsController extends ApplicationApiController
|
|||
public function details(UpdateServerDetailsRequest $request): array
|
||||
{
|
||||
$server = $this->detailsModificationService->returnUpdatedModel()->handle(
|
||||
$request->getModel(Server::class), $request->validated()
|
||||
$request->getModel(Server::class),
|
||||
$request->validated()
|
||||
);
|
||||
|
||||
return $this->fractal->item($server)
|
||||
|
@ -62,10 +57,6 @@ class ServerDetailsController extends ApplicationApiController
|
|||
/**
|
||||
* Update the build details for a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerBuildConfigurationRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return array
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
|
|
@ -23,9 +23,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* SuspensionController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\ReinstallServerService $reinstallServerService
|
||||
* @param \Pterodactyl\Services\Servers\SuspensionService $suspensionService
|
||||
*/
|
||||
public function __construct(
|
||||
ReinstallServerService $reinstallServerService,
|
||||
|
@ -40,10 +37,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Suspend a server on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function suspend(ServerWriteRequest $request, Server $server): Response
|
||||
|
@ -56,10 +49,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Unsuspend a server on the Panel.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function unsuspend(ServerWriteRequest $request, Server $server): Response
|
||||
|
@ -72,10 +61,6 @@ class ServerManagementController extends ApplicationApiController
|
|||
/**
|
||||
* Mark a server as needing to be reinstalled.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\ServerWriteRequest $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\Response
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\DisplayException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
|
|
|
@ -18,8 +18,6 @@ class StartupController extends ApplicationApiController
|
|||
|
||||
/**
|
||||
* StartupController constructor.
|
||||
*
|
||||
* @param \Pterodactyl\Services\Servers\StartupModificationService $modificationService
|
||||
*/
|
||||
public function __construct(StartupModificationService $modificationService)
|
||||
{
|
||||
|
@ -31,9 +29,6 @@ class StartupController extends ApplicationApiController
|
|||
/**
|
||||
* Update the startup and environment settings for a specific server.
|
||||
*
|
||||
* @param \Pterodactyl\Http\Requests\Api\Application\Servers\UpdateServerStartupRequest $request
|
||||
* @return array
|
||||
*
|
||||
* @throws \Illuminate\Validation\ValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
|
|
Reference in a new issue