mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Mark DB->getHandle() as nullable, and update related methods
This commit is contained in:
parent
840617eece
commit
59113fc385
1 changed files with 4 additions and 4 deletions
|
|
@ -158,9 +158,9 @@ class DB
|
||||||
/**
|
/**
|
||||||
* Get the PDO handle for direct manipulation.
|
* 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;
|
return $this->_handle;
|
||||||
}
|
}
|
||||||
|
|
@ -1430,7 +1430,7 @@ class DB
|
||||||
*/
|
*/
|
||||||
public function isConnected(): bool
|
public function isConnected(): bool
|
||||||
{
|
{
|
||||||
return true;
|
return $this->_handle ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1496,7 +1496,7 @@ class DB
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
public function _getConnection(): \PDO
|
public function _getConnection(): ?Helpers\DBHelper
|
||||||
{
|
{
|
||||||
return $this->getHandle();
|
return $this->getHandle();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue