Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -53,14 +53,6 @@ class ServerTransferController extends Controller
|
|||
|
||||
/**
|
||||
* ServerTransferController constructor.
|
||||
*
|
||||
* @param \Prologue\Alerts\AlertsMessageBag $alert
|
||||
* @param \Pterodactyl\Contracts\Repository\AllocationRepositoryInterface $allocationRepository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\ServerRepository $repository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\LocationRepository $locationRepository
|
||||
* @param \Pterodactyl\Repositories\Eloquent\NodeRepository $nodeRepository
|
||||
* @param \Pterodactyl\Services\Servers\TransferService $transferService
|
||||
* @param \Pterodactyl\Repositories\Wings\DaemonConfigurationRepository $daemonConfigurationRepository
|
||||
*/
|
||||
public function __construct(
|
||||
AlertsMessageBag $alert,
|
||||
|
@ -83,8 +75,6 @@ class ServerTransferController extends Controller
|
|||
/**
|
||||
* Starts a transfer of a server to a new node.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Pterodactyl\Models\Server $server
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
|
@ -108,7 +98,7 @@ class ServerTransferController extends Controller
|
|||
$this->daemonConfigurationRepository->setNode($node)->getSystemInformation();
|
||||
|
||||
// Create a new ServerTransfer entry.
|
||||
$transfer = new ServerTransfer;
|
||||
$transfer = new ServerTransfer();
|
||||
|
||||
$transfer->server_id = $server->id;
|
||||
$transfer->old_node = $server->node_id;
|
||||
|
@ -136,11 +126,6 @@ class ServerTransferController extends Controller
|
|||
|
||||
/**
|
||||
* Assigns the specified allocations to the specified server.
|
||||
*
|
||||
* @param Server $server
|
||||
* @param int $node_id
|
||||
* @param int $allocation_id
|
||||
* @param array $additional_allocations
|
||||
*/
|
||||
private function assignAllocationsToServer(Server $server, int $node_id, int $allocation_id, array $additional_allocations)
|
||||
{
|
||||
|
@ -151,14 +136,14 @@ class ServerTransferController extends Controller
|
|||
|
||||
$updateIds = [];
|
||||
foreach ($allocations as $allocation) {
|
||||
if (! in_array($allocation, $unassigned)) {
|
||||
if (!in_array($allocation, $unassigned)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$updateIds[] = $allocation;
|
||||
}
|
||||
|
||||
if (! empty($updateIds)) {
|
||||
if (!empty($updateIds)) {
|
||||
$this->allocationRepository->updateWhereIn('id', $updateIds, ['server_id' => $server->id]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue