Use more standardized phpcs

This commit is contained in:
Dane Everitt 2021-01-23 12:33:34 -08:00
parent a043071e3c
commit c449ca5155
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
493 changed files with 1116 additions and 3903 deletions

View file

@ -31,11 +31,6 @@ class ServerDetailsController extends Controller
/**
* ServerConfigurationController constructor.
*
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
* @param \Pterodactyl\Services\Eggs\EggConfigurationService $eggConfigurationService
* @param \Pterodactyl\Repositories\Eloquent\NodeRepository $nodeRepository
*/
public function __construct(
ServerRepository $repository,
@ -52,8 +47,8 @@ class ServerDetailsController extends Controller
* Returns details about the server that allows Wings to self-recover and ensure
* that the state of the server matches the Panel at all times.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
*
* @return \Illuminate\Http\JsonResponse
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -71,7 +66,6 @@ class ServerDetailsController extends Controller
/**
* Lists all servers with their configurations that are assigned to the requesting node.
*
* @param \Illuminate\Http\Request $request
* @return \Pterodactyl\Http\Resources\Wings\ServerConfigurationCollection
*/
public function list(Request $request)

View file

@ -18,8 +18,6 @@ class ServerInstallController extends Controller
/**
* ServerInstallController constructor.
*
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
*/
public function __construct(ServerRepository $repository)
{
@ -29,8 +27,6 @@ class ServerInstallController extends Controller
/**
* Returns installation information for a server.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -50,8 +46,6 @@ class ServerInstallController extends Controller
/**
* Updates the installation state of a server.
*
* @param \Pterodactyl\Http\Requests\Api\Remote\InstallationDataRequest $request
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException

View file

@ -53,13 +53,6 @@ class ServerTransferController extends Controller
/**
* ServerTransferController constructor.
*
* @param \Illuminate\Database\ConnectionInterface $connection
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonServerRepository
* @param \Pterodactyl\Repositories\Wings\DaemonTransferRepository $daemonTransferRepository
* @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $configurationStructureService
* @param \Pterodactyl\Services\Nodes\NodeJWTService $jwtService
*/
public function __construct(
ConnectionInterface $connection,
@ -80,8 +73,6 @@ class ServerTransferController extends Controller
/**
* The daemon notifies us about the archive status.
*
* @param \Illuminate\Http\Request $request
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
@ -92,7 +83,7 @@ class ServerTransferController extends Controller
$server = $this->repository->getByUuid($uuid);
// Unsuspend the server and don't continue the transfer.
if (! $request->input('successful')) {
if (!$request->input('successful')) {
return $this->processFailedTransfer($server->transfer);
}
@ -137,7 +128,6 @@ class ServerTransferController extends Controller
/**
* The daemon notifies us about a transfer failure.
*
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Throwable
@ -152,7 +142,6 @@ class ServerTransferController extends Controller
/**
* The daemon notifies us about a transfer success.
*
* @param string $uuid
* @return \Illuminate\Http\JsonResponse
*
* @throws \Throwable
@ -165,7 +154,7 @@ class ServerTransferController extends Controller
/** @var \Pterodactyl\Models\Server $server */
$server = $this->connection->transaction(function () use ($server, $transfer) {
$allocations = [$transfer->old_allocation];
if (! empty($transfer->old_additional_allocations)) {
if (!empty($transfer->old_additional_allocations)) {
array_push($allocations, $transfer->old_additional_allocations);
}
@ -201,7 +190,6 @@ class ServerTransferController extends Controller
* Release all of the reserved allocations for this transfer and mark it as failed in
* the database.
*
* @param \Pterodactyl\Models\ServerTransfer $transfer
* @return \Illuminate\Http\JsonResponse
*
* @throws \Throwable
@ -212,7 +200,7 @@ class ServerTransferController extends Controller
$transfer->forceFill(['successful' => false])->saveOrFail();
$allocations = [$transfer->new_allocation];
if (! empty($transfer->new_additional_allocations)) {
if (!empty($transfer->new_additional_allocations)) {
array_push($allocations, $transfer->new_additional_allocations);
}