mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix compatibility with php72
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
class DB
|
||||
{
|
||||
private DBInterface $driver;
|
||||
private $driver;
|
||||
|
||||
private static $instance;
|
||||
|
||||
private static array $queries = [];
|
||||
private static $queries = [];
|
||||
|
||||
private function __construct()
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class DBMysqli implements DBInterface
|
||||
{
|
||||
private mysqli $mysqli;
|
||||
private $mysqli;
|
||||
|
||||
public function connect($host, $username, $password, $database, $port)
|
||||
{
|
||||
@@ -43,17 +43,17 @@ class DBMysqli implements DBInterface
|
||||
return $this->mysqli->select_db($database);
|
||||
}
|
||||
|
||||
public function fetchAssoc($mysqliResult): array|null
|
||||
public function fetchAssoc($mysqliResult)
|
||||
{
|
||||
return $mysqliResult->fetch_assoc();
|
||||
}
|
||||
|
||||
public function fetchRow($mysqliResult): array|null
|
||||
public function fetchRow($mysqliResult)
|
||||
{
|
||||
return $mysqliResult->fetch_row();
|
||||
}
|
||||
|
||||
public function fetchArray($mysqliResult, $type): array|null
|
||||
public function fetchArray($mysqliResult, $type)
|
||||
{
|
||||
if (is_null($type)) {
|
||||
$type = MYSQLI_BOTH;
|
||||
|
||||
@@ -14,11 +14,11 @@ interface DBInterface
|
||||
|
||||
public function selectDb($database);
|
||||
|
||||
public function fetchAssoc($result): array|null;
|
||||
public function fetchAssoc($result);
|
||||
|
||||
public function fetchRow($result): array|null;
|
||||
public function fetchRow($result);
|
||||
|
||||
public function fetchArray($result, $type): array|null;
|
||||
public function fetchArray($result, $type);
|
||||
|
||||
public function affectedRows(): int;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user