From 59113fc385c5780a84e6c04aa18769840fcb2e1b Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 19 Jun 2023 15:22:06 +0900 Subject: [PATCH] Mark DB->getHandle() as nullable, and update related methods --- common/framework/DB.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/framework/DB.php b/common/framework/DB.php index 65f166035..bc0a2c250 100644 --- a/common/framework/DB.php +++ b/common/framework/DB.php @@ -158,9 +158,9 @@ class DB /** * Get the PDO handle for direct manipulation. * - * @return Helpers\DBHelper + * @return ?Helpers\DBHelper */ - public function getHandle(): Helpers\DBHelper + public function getHandle(): ?Helpers\DBHelper { return $this->_handle; } @@ -1430,7 +1430,7 @@ class DB */ public function isConnected(): bool { - return true; + return $this->_handle ? true : false; } /** @@ -1496,7 +1496,7 @@ class DB { return 0; } - public function _getConnection(): \PDO + public function _getConnection(): ?Helpers\DBHelper { return $this->getHandle(); }