Merge branch 'develop' into dane/restore-backups

This commit is contained in:
Dane Everitt 2021-01-25 19:16:40 -08:00
commit 663143de0b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
575 changed files with 6080 additions and 6864 deletions

View file

@ -10,8 +10,8 @@ use Pterodactyl\Exceptions\Http\Server\ServerTransferringException;
class SuspensionService
{
const ACTION_SUSPEND = 'suspend';
const ACTION_UNSUSPEND = 'unsuspend';
public const ACTION_SUSPEND = 'suspend';
public const ACTION_UNSUSPEND = 'unsuspend';
/**
* @var \Illuminate\Database\ConnectionInterface
@ -25,9 +25,6 @@ class SuspensionService
/**
* SuspensionService constructor.
*
* @param \Illuminate\Database\ConnectionInterface $connection
* @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonServerRepository
*/
public function __construct(
ConnectionInterface $connection,
@ -40,7 +37,6 @@ class SuspensionService
/**
* Suspends a server on the system.
*
* @param \Pterodactyl\Models\Server $server
* @param string $action
*
* @throws \Throwable
@ -58,8 +54,8 @@ class SuspensionService
}
// Check if the server is currently being transferred.
if (! is_null($server->transfer)) {
throw new ServerTransferringException;
if (!is_null($server->transfer)) {
throw new ServerTransferringException();
}
$this->connection->transaction(function () use ($action, $server, $isSuspending) {