strict to phpstan-level-4

This commit is contained in:
crazywhalecc
2022-04-03 01:47:38 +08:00
parent 0bab2e74b0
commit 3451434997
19 changed files with 67 additions and 59 deletions

View File

@@ -9,8 +9,6 @@ declare(strict_types=1);
namespace ZM\DB;
use PDOException;
use PDOStatement;
use Swoole\Database\PDOStatementProxy;
use ZM\Console\Console;
use ZM\Exception\DbException;
use ZM\MySQL\MySQLManager;
@@ -102,11 +100,6 @@ class DB
SqlPoolStorage::$sql_pool->putConnection(null);
throw new DbException('SQL语句查询错误' . $line . ',错误信息:' . $conn->errorInfo()[2]);
}
if (!($ps instanceof PDOStatement) && !($ps instanceof PDOStatementProxy)) {
var_dump($ps);
SqlPoolStorage::$sql_pool->putConnection(null);
throw new DbException('语句查询错误!返回的不是 PDOStatement' . $line);
}
if ($params == []) {
$result = $ps->execute();
} elseif (!is_array($params)) {