Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
|
@ -82,7 +82,7 @@ class BuildModificationService
|
|||
|
||||
$updateData = $this->structureService->handle($server);
|
||||
|
||||
if (!empty($updateData['build'])) {
|
||||
if (! empty($updateData['build'])) {
|
||||
$this->daemonServerRepository->setServer($server)->update([
|
||||
'build' => $updateData['build'],
|
||||
]);
|
||||
|
|
|
@ -4,7 +4,6 @@ namespace Pterodactyl\Services\Servers;
|
|||
|
||||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Repositories\Eloquent\ServerRepository;
|
||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||
|
||||
class ReinstallServerService
|
||||
|
|
|
@ -38,7 +38,7 @@ class ServerConfigurationStructureService
|
|||
$clone = $server;
|
||||
// If any overrides have been set on this call make sure to update them on the
|
||||
// cloned instance so that the configuration generated uses them.
|
||||
if (!empty($override)) {
|
||||
if (! empty($override)) {
|
||||
$clone = $server->fresh();
|
||||
foreach ($override as $key => $value) {
|
||||
$clone->setAttribute($key, $value);
|
||||
|
@ -95,10 +95,10 @@ class ServerConfigurationStructureService
|
|||
'id' => $server->egg->uuid,
|
||||
'file_denylist' => [
|
||||
'config.yml',
|
||||
'**/*.json'
|
||||
]
|
||||
'**/*.json',
|
||||
],
|
||||
// 'file_denylist' => explode(PHP_EOL, $server->egg->inherit_file_denylist),
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -124,12 +124,12 @@ class ServerConfigurationStructureService
|
|||
})->toArray(),
|
||||
'env' => $this->environment->handle($server),
|
||||
'oom_disabled' => $server->oom_disabled,
|
||||
'memory' => (int)$server->memory,
|
||||
'swap' => (int)$server->swap,
|
||||
'io' => (int)$server->io,
|
||||
'cpu' => (int)$server->cpu,
|
||||
'memory' => (int) $server->memory,
|
||||
'swap' => (int) $server->swap,
|
||||
'io' => (int) $server->io,
|
||||
'cpu' => (int) $server->cpu,
|
||||
'threads' => $server->threads,
|
||||
'disk' => (int)$server->disk,
|
||||
'disk' => (int) $server->disk,
|
||||
'image' => $server->image,
|
||||
],
|
||||
'service' => [
|
||||
|
@ -137,7 +137,7 @@ class ServerConfigurationStructureService
|
|||
'skip_scripts' => $server->skip_scripts,
|
||||
],
|
||||
'rebuild' => false,
|
||||
'suspended' => (int)$server->suspended,
|
||||
'suspended' => (int) $server->suspended,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ class ServerDeletionService
|
|||
try {
|
||||
$this->databaseManagementService->delete($database);
|
||||
} catch (Exception $exception) {
|
||||
if (!$this->force) {
|
||||
if (! $this->force) {
|
||||
throw $exception;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ class StartupCommandService
|
|||
|
||||
foreach ($server->variables as $variable) {
|
||||
$find[] = '{{' . $variable->env_variable . '}}';
|
||||
$replace[] = ($variable->user_viewable && !$hideAllValues) ? ($variable->server_value ?? $variable->default_value) : '[hidden]';
|
||||
$replace[] = ($variable->user_viewable && ! $hideAllValues) ? ($variable->server_value ?? $variable->default_value) : '[hidden]';
|
||||
}
|
||||
|
||||
return str_replace($find, $replace, $server->startup);
|
||||
|
|
|
@ -91,7 +91,7 @@ class StartupModificationService
|
|||
{
|
||||
$eggId = Arr::get($data, 'egg_id');
|
||||
|
||||
if (is_digit($eggId) && $server->egg_id !== (int)$eggId) {
|
||||
if (is_digit($eggId) && $server->egg_id !== (int) $eggId) {
|
||||
/** @var \Pterodactyl\Models\Egg $egg */
|
||||
$egg = Egg::query()->findOrFail($data['egg_id']);
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ use Webmozart\Assert\Assert;
|
|||
use Pterodactyl\Models\Server;
|
||||
use Illuminate\Database\ConnectionInterface;
|
||||
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
||||
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
|
||||
use Pterodactyl\Exceptions\Http\Server\ServerTransferringException;
|
||||
|
||||
class SuspensionService
|
||||
|
|
|
@ -68,7 +68,7 @@ class VariableValidatorService
|
|||
}
|
||||
|
||||
return Collection::make($variables)->map(function ($item) use ($fields) {
|
||||
return (object)[
|
||||
return (object) [
|
||||
'id' => $item->id,
|
||||
'key' => $item->env_variable,
|
||||
'value' => $fields[$item->env_variable] ?? null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue