Fix StyleCI issues

This commit is contained in:
Matthew Penner 2020-04-04 16:24:58 -06:00
parent 454ce6ce45
commit 142bf16aae
9 changed files with 27 additions and 34 deletions

View file

@ -2,7 +2,6 @@
namespace Pterodactyl\Services\Servers;
use Illuminate\Support\Facades\Log;
use Psr\Log\LoggerInterface;
use Webmozart\Assert\Assert;
use Pterodactyl\Models\Server;
@ -74,14 +73,10 @@ class SuspensionService
return;
}
Log::debug('SuspensionService: ' . $action);
$this->connection->transaction(function () use ($action, $server) {
$this->repository->withoutFreshModel()->update($server->id, [
'suspended' => $action === self::ACTION_SUSPEND,
]);
Log::debug('Server suspended: ' . ($action === self::ACTION_SUSPEND) ? 'true' : 'false');
Log::debug('Daemon unsuspended: ' . ($action === self::ACTION_UNSUSPEND) ? 'true' : 'false');
$this->daemonServerRepository->setServer($server)->suspend($action === self::ACTION_UNSUSPEND);
});

View file

@ -2,11 +2,9 @@
namespace Pterodactyl\Services\Servers;
use Illuminate\Database\ConnectionInterface;
use Psr\Log\LoggerInterface;
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
use Pterodactyl\Models\Server;
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
use Pterodactyl\Contracts\Repository\ServerRepositoryInterface;
class TransferService
{