From 1c2b8fc4d058dbccd192c2242336810fc40ddd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 21 Oct 2024 12:11:21 +0200 Subject: [PATCH] Refactor code to use backticks for displaying database connection details in DbTestCommand.php --- src/Commands/Db/DbTestCommand.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Commands/Db/DbTestCommand.php b/src/Commands/Db/DbTestCommand.php index 4244dda..a415854 100644 --- a/src/Commands/Db/DbTestCommand.php +++ b/src/Commands/Db/DbTestCommand.php @@ -47,19 +47,19 @@ public function handle() $username = $connection->getConfig('username'); $password = $connection->getConfig('password'); - $this->comment("Driver: {$driver}"); - $this->comment("Database: {$database}"); - $this->comment("Host: {$host}"); - $this->comment("Port: {$port}"); + $this->comment("Driver: `{$driver}`"); + $this->comment("Database: `{$database}`"); + $this->comment("Host: `{$host}`"); + $this->comment("Port: `{$port}`"); if ($credentials) { - $this->comment("Username: {$username}"); - $this->comment("Password: {$password}"); + $this->comment("Username: `{$username}`"); + $this->comment("Password: `{$password}`"); } $this->newLine(); - $this->comment("Try to ping database at {$host}:{$port}..."); + $this->comment("Try to ping database at `{$host}:{$port}`..."); $available = $this->pingDatabase($host, $port); $this->info($available ? 'Database is available.' : 'Database is not available.'); @@ -126,11 +126,11 @@ private function testConnection(\Illuminate\Database\Connection $connection): bo } $this->alert('Connection successful.'); - $this->comment("Driver name: {$driverName}"); - $this->comment("Server info: {$serverInfo}"); - $this->comment("Client version: {$clientVersion}"); - $this->comment("Server version: {$serverVersion}"); - $this->comment("Connection status: {$connectionStatus}"); + $this->comment("Driver name: `{$driverName}`"); + $this->comment("Server info: `{$serverInfo}`"); + $this->comment("Client version: `{$clientVersion}`"); + $this->comment("Server version: `{$serverVersion}`"); + $this->comment("Connection status: `{$connectionStatus}`"); return true; }