mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-11 14:38:39 +00:00
Typehint
This commit is contained in:
parent
2c52f544c1
commit
d1f6ba7f12
|
|
@ -74,6 +74,8 @@ class MysqlConnection extends ConnectionAbstract
|
||||||
} catch (\PDOException $e) {
|
} catch (\PDOException $e) {
|
||||||
$this->status = DatabaseStatus::MISSING_DATABASE;
|
$this->status = DatabaseStatus::MISSING_DATABASE;
|
||||||
$this->con = null;
|
$this->con = null;
|
||||||
|
} finally {
|
||||||
|
$this->dbdata['password'] = '****';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class Pool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function add($key = 'core', ConnectionAbstract $db) : bool
|
public function add(string $key = 'core', ConnectionAbstract $db) : bool
|
||||||
{
|
{
|
||||||
if (isset($this->pool[$key])) {
|
if (isset($this->pool[$key])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -83,7 +83,7 @@ class Pool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function get($key = 'core')
|
public function get(string $key = 'core')
|
||||||
{
|
{
|
||||||
if (!isset($this->pool[$key])) {
|
if (!isset($this->pool[$key])) {
|
||||||
return false; /* todo: return nullconnection */
|
return false; /* todo: return nullconnection */
|
||||||
|
|
@ -102,7 +102,7 @@ class Pool
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
public function remove($key) : bool
|
public function remove(string $key) : bool
|
||||||
{
|
{
|
||||||
if (!isset($this->pool[$key])) {
|
if (!isset($this->pool[$key])) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user