From 6815b83c8459b579520216d0a99f2cde1508b58d Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Tue, 23 Jan 2024 12:59:57 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Actions/ManagesServers.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Actions/ManagesServers.php b/src/Actions/ManagesServers.php index e19617a..47c2172 100644 --- a/src/Actions/ManagesServers.php +++ b/src/Actions/ManagesServers.php @@ -45,9 +45,9 @@ public function createServer(array $data, $wait = false, $timeout = 900) $server = $response['server']; $initialSudoPassword = $response['sudo_password'] ?? null; - $initialDatabasePassword = $response['database_password'] ?? null; - $initialProvisionCommand = $response['provision_command'] ?? null; - + $initialDatabasePassword = $response['database_password'] ?? null; + $initialProvisionCommand = $response['provision_command'] ?? null; + $server['sudo_password'] = $initialSudoPassword; $server['database_password'] = $initialDatabasePassword; $server['provision_command'] = $initialProvisionCommand; @@ -56,9 +56,9 @@ public function createServer(array $data, $wait = false, $timeout = 900) return $this->retry($timeout, function () use ($server, $initialSudoPassword, $initialDatabasePassword, $initialProvisionCommand) { $server = $this->server($server['id']); $server->sudoPassword = $initialSudoPassword; - $server->databasePassword = $initialDatabasePassword; - $server->provisionCommand = $initialProvisionCommand; - + $server->databasePassword = $initialDatabasePassword; + $server->provisionCommand = $initialProvisionCommand; + return $server->isReady ? $server : null; }, 120); }