From 3a306cc2791c55e5f09cb1849b9fb697a4072ea1 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Mon, 29 Jan 2024 13:30:58 +0700 Subject: [PATCH] Fix psalm issues --- src/Dsn.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Dsn.php b/src/Dsn.php index b786aff1..99c456fd 100644 --- a/src/Dsn.php +++ b/src/Dsn.php @@ -45,7 +45,8 @@ public function asString(): string $server = "Server=$this->host;"; } - if ($this->databaseName !== null) { + /** @psalm-suppress RiskyTruthyFalsyComparison */ + if (!empty($this->databaseName)) { $dsn = "$this->driver:" . $server . "Database=$this->databaseName"; } else { $dsn = "$this->driver:" . $server;