diff --git a/core/c/mysql.php b/core/c/mysql.php index 88bad66..8c7fe0d 100755 --- a/core/c/mysql.php +++ b/core/c/mysql.php @@ -47,7 +47,11 @@ class Mysql implements IMysql } } - public static function getInstance( $section = false ) + /** + * @param false $section + * @return Mysql + */ + public static function getInstance( $section = false ): Mysql { $className = get_called_class(); if(self::$_instance==null) self::$_instance = new $className( $section ); @@ -150,10 +154,10 @@ class Mysql implements IMysql $this->_dbname = $dbname; } - /** - * @return string - */ - protected function getConn() + /** + * @return \PDO + */ + public function getConn(): \PDO { return $this->_conn; } diff --git a/core/c/odbc.php b/core/c/odbc.php index 18f74ec..a8728f0 100755 --- a/core/c/odbc.php +++ b/core/c/odbc.php @@ -46,7 +46,7 @@ class Odbc extends Mysql implements IOdbc } - public static function getInstance( $section = false ) + public static function getInstance( $section = false ): Mysql { $className = get_called_class(); if(self::$_instance==null) self::$_instance = new $className( $section ); diff --git a/core/c/psql.php b/core/c/psql.php index 6b621eb..3f58c8d 100644 --- a/core/c/psql.php +++ b/core/c/psql.php @@ -7,7 +7,7 @@ namespace Nibiru; * Time: 11:02 */ -class Psql extends Mysql implements IPsql +class Psql implements IPsql { use Messages; @@ -45,7 +45,7 @@ class Psql extends Mysql implements IPsql } } - public static function getInstance( $section = false ) + public static function getInstance( $section = false ): Psql { $className = get_called_class(); if(self::$_instance==null) self::$_instance = new $className( $section );