From debb6c02b38071f0d2e104bc2bf935530f9c4123 Mon Sep 17 00:00:00 2001 From: pine3ree Date: Wed, 4 Oct 2023 23:58:05 +0200 Subject: [PATCH] Remove unnecessary condition Signed-off-by: pine3ree --- src/PDO/Reconnecting/PDO.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/PDO/Reconnecting/PDO.php b/src/PDO/Reconnecting/PDO.php index 808f420..1d0cafb 100644 --- a/src/PDO/Reconnecting/PDO.php +++ b/src/PDO/Reconnecting/PDO.php @@ -82,14 +82,10 @@ protected function pdo(): \PDO $this->pdo = parent::pdo(); - if (isset($this->pdo)) { - $this->lastConnectedAt = microtime(true); - $this->connectionCount += 1; - - return $this->pdo; - } + $this->lastConnectedAt = microtime(true); + $this->connectionCount += 1; - throw new RuntimeException("Unable to create a PDO instance!"); + return $this->pdo; } /**